camelCase converter
Converts any text into the naming style you need — for variables, files and identifiers.
Type or paste any text — a phrase, a variable name in another style, a column heading — and press the style you want. Each button converts to one naming convention, and they all read the input the same way, so you can switch between them freely.
The five conventions and where each belongs
- camelCase — first word lower, each following word capitalised, no separators:
getUserName. JavaScript and Java variables and functions, JSON keys. - PascalCase — like camelCase but the first word is capitalised too:
GetUserName. Class and type names in most languages, React components, C# methods. - snake_case — all lower, words joined by underscores:
get_user_name. Python and Ruby variables, database columns, most SQL. - kebab-case — all lower, words joined by hyphens:
get-user-name. URLs, CSS class names, HTML attributes, npm package names, file names on the web. For a full URL slug, with accent removal and transliteration, the slug generator does more. - CONSTANT_CASE — all upper, underscores:
GET_USER_NAME. Constants and environment variables.
How the words are found
The clever part of any case converter is splitting the input into words, because the input can arrive in any form.
This one recognises word boundaries from spaces, hyphens and underscores, and also from case changes — so
getUserName, get_user_name, get user name and Get-User-Name all
split into the same three words. That means you can convert straight from one style to another without going through
plain text first.
Runs of capitals are handled sensibly: parseHTTPResponse splits into parse, HTTP, response rather than
parse, H, T, T, P. Numbers stay attached to the word they follow, so utf8Encoder keeps utf8
together.
Why get this right
Naming conventions are not decoration — mixing them causes real bugs. A JSON key sent as user_name when
the code expects userName silently reads as undefined. A CSS class in snake_case does not match a selector
written in kebab-case. A database column and its model property drifting apart cause mapping errors. Converting a whole
list of names to one convention in a single press is how you keep them consistent.
Doing it without this tool
Editors: VS Code has no built-in case conversion between these styles; extensions add it. Many IDEs offer some of them through refactoring, one identifier at a time.
Excel: no built-in support. SUBSTITUTE can join words with underscores but cannot handle the
capitalisation logic without a long formula.
Command line: possible with sed and awk, but the word-splitting rules — especially
handling runs of capitals — take more code than the job is worth for a one-off.
Programming: most languages have a library (like lodash's camelCase,
snakeCase, kebabCase) which is the right answer inside a codebase, but overkill for
converting a handful of names.
Runs entirely in your browser. Your text is never uploaded — open DevTools, Network tab, and you will see zero requests while you use this tool.
How to use it
- Paste your text or an existing identifier into the box.
- Press the style you need: camelCase, PascalCase, snake_case, kebab-case or CONSTANT_CASE.
- You can convert straight from one style to another — the splitter reads them all.
- Copy the result into your code.
Related tools
Frequently asked questions
Yes. The word splitter recognises boundaries from spaces, hyphens, underscores and case changes, so camelCase, snake_case and a plain phrase all split into the same words. Just press the target style.
It keeps them together as one word, so parseHTTPResponse becomes parse, HTTP, response rather than splitting every letter. The result reads correctly in every style.
Only the first letter. camelCase starts lower (getUserName), PascalCase starts upper (GetUserName). camelCase is usual for variables, PascalCase for class and type names.
kebab-case, with hyphens between lowercase words. For a full URL slug that also strips accents and transliterates other alphabets, use the slug generator instead.
They stay attached to the word they follow, so utf8Encoder keeps utf8 together rather than splitting the digit off.