Case Converter
One phrase into camelCase, snake_case, kebab-case, CONSTANT_CASE, a slug and more.
Runs entirely in your browser — nothing you paste is uploaded.
About Case Converter
Renaming a field across a stack means writing the same word four ways: `userId` in TypeScript, `user_id` in Postgres, `user-id` in a CSS class or a URL, `USER_ID` in an environment variable. This does all of them at once from whatever you paste in.
The splitting is the part that has to be right. Input is broken on camelCase boundaries, underscores, hyphens, dots and spaces, and the tokeniser handles consecutive capitals sensibly — `parseHTMLDocument` splits into `parse`, `HTML`, `Document` rather than exploding one letter at a time. That's the difference between `parse_html_document` and `parse_h_t_m_l_document`.
The slug output does more than lowercase and hyphenate: it strips diacritics so `Café Münster` becomes `cafe-munster`, drops punctuation, and collapses repeated separators. That matches what a URL actually wants and what most CMS slug fields produce.
Which convention goes where is largely settled by ecosystem, not preference. camelCase for JavaScript and Java identifiers, PascalCase for types and React components, snake_case for Python and SQL, kebab-case for URLs, CSS and CLI flags, CONSTANT_CASE for environment variables. The useful discipline is picking the convention the surrounding code already uses rather than the one you like.
Frequently asked
›What is the difference between kebab-case and snake_case?
Only the separator — a hyphen versus an underscore. It matters because a hyphen is not a legal identifier character in most languages, which is why kebab-case lives in URLs, CSS and CLI flags, while snake_case is used for variables in Python, Ruby and SQL.
›How are acronyms handled?
As single tokens. `parseHTMLDocument` splits into `parse` / `HTML` / `Document`, giving `parse_html_document` rather than `parse_h_t_m_l_document`. Going the other way, `HTML` in a camelCase output becomes `Html` — which is the convention most style guides prefer for exactly this reason.
›What happens to accented characters in a slug?
They're transliterated to their ASCII base — `é` becomes `e`, `ü` becomes `u` — via Unicode normalisation, then the combining marks are stripped. Characters with no ASCII equivalent, like CJK, are dropped rather than mangled.
›Is Title Case the same as capitalising every word?
No. Real title case leaves short articles, conjunctions and prepositions lowercase unless they start or end the title — 'The Rise of the Machines', not 'The Rise Of The Machines'. This tool capitalises each word, which is what identifier conversion actually wants.
›Which case should I use for environment variables?
CONSTANT_CASE — uppercase with underscores. It's a POSIX shell convention, not a hard rule, but tooling everywhere assumes it, and lowercase environment variables are conventionally reserved for shell-local ones.