camelCase Converter

Convert space, snake, or kebab text to camelCase identifier format

Convert any phrase, snake_case, kebab-case, or PascalCase string into camelCase. Splits on separators and word boundaries, lowercases the first word, and capitalises the rest — the standard for JavaScript and Java variable names. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

What is camelCase?

camelCase writes a compound word with no separators, lowercasing the first word and capitalising the first letter of every word after it, like userProfileId. It is the dominant convention for variable and function names in JavaScript, Java, and many other languages.

camelCase is the most common way to name variables and functions in languages like JavaScript and Java. This converter takes any phrase or differently-cased identifier and rewrites it in clean camelCase, handling spaces, underscores, hyphens, and existing case boundaries automatically.

How it works

The converter normalises your input into a list of lowercase word tokens, then rejoins them with the camelCase rule. Word boundaries are detected several ways:

"user profile id"   -> [user, profile, id]
"user_profile_id"   -> [user, profile, id]
"UserProfileID"     -> [user, profile, id]
"oauth2Token"       -> [oauth, 2, token]

Each token after the first has its initial letter uppercased, the first stays lowercase, and they are concatenated with no separators. So all of the examples above collapse to a single camelCase string such as userProfileId.

Language convention guide

Knowing when to use camelCase helps you follow the idiom of each language:

Language / contextConventionExample
JavaScript / TypeScript — variables, functionscamelCasegetUserProfile
JavaScript / TypeScript — classesPascalCaseUserProfile
Java — methods, variablescamelCasecalculateTotal
C# — methods, public propertiesPascalCaseCalculateTotal
C# — local variables, parameterscamelCasecalculateTotal
Python — variables, functionssnake_casecalculate_total
CSS custom properties / HTML attributeskebab-case--primary-color
JSON keys (common but not universal)camelCase"userId": 1

When working across a boundary — for example, a Python backend sending JSON to a JavaScript frontend — you often need to convert between snake_case and camelCase. This tool handles that direction (any input format → camelCase).

Worked conversions

InputOutputNotes
user profile iduserProfileIdplain phrase
user_profile_iduserProfileIdfrom snake_case
user-profile-iduserProfileIdfrom kebab-case
UserProfileIDuserProfileIdfrom PascalCase, acronym lowercased
get HTTP responsegetHttpResponseacronym lowercased
oauth2 tokenoauth2Tokendigit preserved

Handling acronyms

Acronyms like HTTP, URL, ID, and API are normalised to title-initial form: Http, Url, Id, Api. This is the dominant convention in most style guides because it allows camelCase boundaries to remain unambiguous — getHTTPSUrl is harder to split than getHttpsUrl. If your codebase preserves acronym caps, adjust the output manually after copying.

Conversion tips

  • If you are converting a full column of names (database column headers to JS object keys, for example), paste them all at once separated by lines and convert each manually. The converter processes one identifier at a time.
  • After converting, verify the result works as a valid JavaScript identifier: it must not start with a digit, and must not be a reserved word like class, return, or new.