camelCase Converter
Convert any string to camelCase — lowercase first word, capitalized subsequent words, no separators.
About camelCase Converter
camelCase is the dominant naming convention for variables, function parameters, and instance methods in JavaScript, TypeScript, Java, Swift, and many other languages. The first word starts lowercase and every subsequent word is capitalized. This converter handles input from any common shape: words separated by spaces, hyphens, underscores, dots, or slashes — as well as existing camelCase, PascalCase, and snake_case input.
When to use it
- Generating JavaScript variable names from human-readable labels
- Normalizing inconsistent identifier conventions across a codebase
- Converting database column names into JS property names
- Producing camelCase keys from snake_case API responses
How it works
The input is split into words by recognising every common boundary: whitespace, hyphens, underscores, dots, slashes, camelCase transitions, acronym-to-word transitions, and letter-to-digit boundaries. The first word is lowercased; subsequent words have their first letter capitalized and the rest lowercased; everything is joined without separators.
Examples
Hello, world! Foo bar.
helloWorldFooBar
user_name created_at
userNameCreatedAt
HTMLParserError
htmlParserError
Frequently asked questions
- What happens to acronyms?
- Acronyms in the input (HTML, XML, URL) become a single lowercase word in the output ('htmlParserError', not 'hTMLParserError'). This is the modern Google/Airbnb style guide convention.
- Are digits treated as a separator?
- Yes. 'user123Name' becomes 'user123Name' — the digit run is preserved but treated as a word boundary, so 'item2id' becomes 'item2Id'.
- What about non-Latin letters?
- Non-Latin letters are kept but treated as a single word. The case-change boundary detection only fires on ASCII case transitions.