LocalToolkit
HomeText Tools › Case Converter

Case Converter

Eleven naming conventions, applied correctly to acronyms and mixed input.

🔒 Runs in your browser. Nothing is uploaded — verify it in the network panel, or disconnect and try again.

Which convention belongs to which language

ConventionExampleConventional in
camelCaseuserAccountIdJavaScript, Java, Swift, JSON keys
PascalCaseUserAccountIdC# and .NET, Java classes, React components, Go exported names
snake_caseuser_account_idPython, Ruby, Rust, SQL identifiers, C headers
kebab-caseuser-account-idCSS classes, HTML attributes, URL slugs, npm package names
CONSTANT_CASEUSER_ACCOUNT_IDCompile-time constants in nearly every language
Title CaseUser Account IdHeadings, article titles, button labels
Sentence caseUser account idBody copy, list items, tooltips

The hard part is not the shift key

Converting is easy; splitting the input into words is where converters go wrong. The two rules that matter: an uppercase run followed by a lowercase letter starts a new word (HTTPServer is HTTP + Server, not H T T P Server), and a letter followed by a digit or a digit followed by a letter is a boundary (img12 becomes img + 12). This page applies both, so HTTPServer response_code splits into HTTP, Server, response, code.

Title case has rules, not a rule

There is no single correct title case. Chicago style lowercases short prepositions and articles (of, the, a, and) unless they open or close the title; APA capitalises any word of four letters or more. This tool capitalises every word, which is the right default for headings and button labels, and you can lowercase the joiners afterwards if a style guide demands it.

Two traps in code generation

For anything on a website, kebab-case is the safe choice: it is case-insensitive on every filesystem that would host it, it survives people retyping a URL, and it is what search engines expect in a slug.

How to use it

  1. Paste your text — any mix of casing, underscores, hyphens or spaces will do.
  2. Pick the target convention.
  3. Copy the result. The word split is shown so you can check acronym handling.

Worth knowing

  • Word splitting handles acronym runs: HTTPServerHTTP + Server.
  • Digit-to-letter boundaries are treated as word breaks, so img12img + 12.
  • Eleven modes are supported, from camelCase through CONSTANT_CASE and alternating.
  • Non-ASCII letters are preserved rather than silently dropped.

Limitations

  • Title case here capitalises every word; style guides that lowercase short prepositions need manual adjustment.
  • No dictionary lookup is performed, so WiFi cannot be restored from wifi.
  • Language-specific name mangling (Go's exported-name rule, Java's bean conventions) is not applied.
  • Repeated words are kept — deduplication is a separate tool.

Frequently asked questions

What is the difference between camelCase and PascalCase?
Only the first letter. camelCase starts lowercase and is used for variables, methods and JSON keys; PascalCase starts uppercase and is used for class names, React components and Go exported identifiers.
How does it handle acronyms like HTTP?
An uppercase run followed by a lowercase letter starts a new word, so HTTPServer becomes HTTP and Server rather than an unreadable character run.
Should I use snake_case or kebab-case in a URL?
Kebab-case. Hyphens are the convention search engines treat as word separators, and mixed case in URLs risks being folded or mistyped.
Why did my constant become `CLASS_NAME`?
Because the splitter did not know CLASS was reserved. CONSTANT_CASE output is mechanically derived; if the result collides with a reserved word in your language, rename the source concept rather than relying on casing.
Related tools
URL Slug GeneratorWord and Character CounterSort LinesRemove Duplicate LinesLorem Ipsum GeneratorWord Frequency Counter
Keep reading
How browser-only processing worksAll Text Tools toolsEvery tool on the site