Convert text to camelCase

Type user_account_id, user-account-id or “user account id” to get userAccountId, live as you type. camelCase is the convention for variables and keys in JavaScript, TypeScript, Java and Swift. Acronyms need an explicit separator (“api key” → apiKey). The other four conventions are shown alongside. Conversion stays in this tab.

camelCase

userAccountId

PascalCase

UserAccountId

snake_case

user_account_id

kebab-case

user-account-id

CONSTANT_CASE

USER_ACCOUNT_ID

Converted as you typeNothing leaves this tab

Runs in this tab · nothing is uploaded · Verify in 10 seconds →

What this does

camelCase removes the separators between words and capitalizes each word after the first: user_account_id, user-account-id and “user account id” all become userAccountId. Type below and read the camelCase row, conversion is live, with the other four conventions shown alongside.

camelCase is the only common convention that spends zero characters on separation: across the 244 unique object keys harvested from our 26-document sample corpus (measured by scripts/preset-stats.mjs with the same conversion functions this page runs), the average key is 7.2 characters in camelCase versus 7.5 in snake_case and kebab-case, 67 of the 244 keys are multi-word and pay one separator character per word boundary in those conventions.

When it goes wrong

If an acronym comes out wrong (“API key” becoming apiKey is correct, but APIKey staying glued is deliberate, since splitting all-caps runs safely is impossible without a dictionary) add an explicit separator to the input (api key) to control the boundary. Digits stick to the word before them: user2fa becomes user2fa, not user2Fa.

When to use this

camelCase is the convention for variables, functions and object keys in JavaScript, TypeScript, Java and Swift, reach for it when translating snake_case API fields into frontend property names.

This page is a focused view of theCase Converter, which has the full set of options.

Frequently asked questions

What's the difference between camelCase and PascalCase?

Only the first letter: camelCase starts lowercase (userAccountId), PascalCase starts uppercase (UserAccountId). PascalCase conventionally marks types and classes; camelCase marks values. The tool shows both rows.

How are acronyms handled?

Each separated word is capitalized as a unit: “api key” becomes apiKey. An all-caps run without separators (APIKey) is kept as-is where it cannot be safely split.