camelCase Converter
Convert phrases and identifiers to camelCase — with developer-aware splitting, so userID becomes userId, not userid.
All cases — live preview (click any result to copy it)
Private by design — every conversion runs locally in your browser. Your text is never uploaded, stored or tracked.
camelCase is a naming convention where phrases are written without spaces or punctuation, the first word stays lowercase, and each following word is capitalized: backgroundColor, numberOfItems, userProfilePage. The “humps” of the capital letters in the middle give the style its name. It is the standard for variables and functions in JavaScript, Java, Swift and many other languages.
Most converters simply delete spaces, which mangles real code: userID becomes userid and XMLHttpRequest becomes xmlhttprequest. This one splits identifiers the way a developer reads them — it understands existing camel humps, acronym boundaries, underscores, hyphens and numbers — so conversions work in both directions and survive a round trip.
When to use it
- Naming variables, functions and properties in JavaScript, TypeScript and Java
- Turning database column names (user_created_at) into code identifiers (userCreatedAt)
- Converting JSON keys and API field names between conventions
- Cleaning up phrases, headings or file names into valid identifiers
- Learning and teaching naming conventions with instant examples
How it works
- The input is split into words by an identifier-aware splitter: separators, existing camel humps, acronym boundaries and number boundaries all mark word edges.
- The first word is lowercased in full.
- Every following word is capitalized — first letter up, rest down — so an acronym like ID becomes the word “Id”.
- The words are joined with no separator, producing a valid identifier for JavaScript, Java and similar languages.
Examples
The acronym ID is treated as one word, not two letters.
snake_case input converts just as well as plain phrases.
Good to know
camelCase earned its dominance honestly: it is the only major convention that produces readable multi-word identifiers using nothing but letters, which is why JavaScript, Java, C# methods, Swift and Kotlin all standardized on it for variables and functions. Its known weakness is acronyms and numbers — is it userId or userID, version2 or Version2? Style guides answer differently (Google's JavaScript guide prefers userId; Microsoft's C# guidance often keeps ID). This converter follows the “acronym as word” rule consistently, because consistency across a codebase matters more than any single guide's preference.
Round-tripping is the real test of a case converter, and it is the design goal here: user_id → userId → user_id returns exactly what you started with, because every converter on this site shares the same splitter. Where a round trip cannot be perfect, the loss is documented rather than hidden — the original capitalization inside a word like McDonald cannot survive any convention change, and no tool can recover it.
Frequently asked questions
What is the difference between camelCase and PascalCase?
Only the first letter. camelCase starts lowercase (userProfile), PascalCase starts uppercase (UserProfile). camelCase is used for variables and functions; PascalCase is used for classes, components and types.
How does the converter handle acronyms like ID or XML?
It treats a run of capitals as a single word and splits before a capital that starts a new word, so XMLParser becomes xmlParser and userID becomes userId — the same result most style guides (and linters) expect.
What happens to numbers in the text?
Numbers are kept and treated as their own word boundary: “version 2 update” becomes version2Update, and version2Update splits back into version, 2 and update for the underscore and hyphen cases.
Is my text uploaded or stored?
No. The conversion runs entirely in your browser. Nothing you type is sent to a server, stored or logged — safe for proprietary code and field names.
Should acronyms be written as Id or ID in camelCase?
Guides differ. Treating the acronym as a word (userId, xmlParser) is the most common modern rule and the one this converter uses, because it keeps one simple law — capitalize the first letter of each word, lowercase the rest — with no exceptions to memorize.
What characters are removed when converting to camelCase?
Anything that cannot appear in an identifier: spaces, underscores, hyphens, dots and punctuation all act as word separators and disappear. Letters and digits are kept; a digit becomes its own word segment, so “version 2” produces version2.