Case Converter
Convert text between camelCase, snake_case, kebab-case, Title Case and more.
Text
0 characters · 0 without spaces · 0 words · 0 lines
Conversions
Every case style appears here as you type.
About this case converter
Converts text between the naming conventions used in code and prose, all in your browser. Every style updates as you type, so you can pick the one you need rather than choosing first.
The hard part is splitting words
Changing case is trivial; deciding where words begin is not. This tool splits on separators, on lowercase-to-uppercase transitions, and — importantly — on the boundary between an acronym and the word that follows it. So XMLHttpRequest becomes xml_http_request, not x_m_l_http_request, and utf8Encoder splits at the letter/digit boundary into utf_8_encoder. Most converters get acronyms wrong, which is what makes them useless on real identifiers.
Which convention goes where
- camelCase — variables and functions in JavaScript, Java, Go (unexported).
- PascalCase — types, classes and components almost everywhere; exported names in Go.
- snake_case — Python and Ruby identifiers, SQL columns.
- CONSTANT_CASE — constants and environment variables.
- kebab-case — URLs, CSS classes, HTML attributes, npm package names.
What is preserved
lowercase, UPPERCASE, Title Case, Sentence case and the novelty styles operate on your text in place, so punctuation and line breaks survive. The identifier styles — camel, snake, kebab and the rest — normalize whitespace by design, because an identifier cannot contain it.