Case Converter

Switch text between nine cases — writing cases like Title Case and Sentence case, and programming cases like camelCase and snake_case. Conversion happens instantly in your browser.

case-converter · runs locally

Nine cases, one converter

Case conversion sounds trivial until you hit the edge cases: Title Case has small-word rules, Sentence case needs to find sentence boundaries, and the programming cases — camelCase, PascalCase, snake_case, kebab-case and CONSTANT_CASE — first have to work out where the words are. This converter tokenizes on spaces, underscores, hyphens and camelCase boundaries, so userAccountId, user_account_id and user-account-id all convert cleanly into any of the others.

That makes it a practical rename assistant: paste a column list from a database and get camelCase keys for your API, or turn a page heading into a kebab-case URL slug. Everything runs locally in your browser — nothing is uploaded.

How to convert text case

  1. Paste your text into the input on the left.
  2. Click any of the nine case buttons — the output updates instantly.
  3. Try another case on the same input, then copy the result.

Choosing the right case

For prose, Title Case is standard for headlines in US publications while Sentence case dominates UK style and most modern UI copy. In code, follow the language you are in: camelCase variables in JavaScript and Java, snake_case in Python and SQL, PascalCase for classes and React components, CONSTANT_CASE for values that never change, and kebab-case for URLs and CSS classes. After renaming a batch of identifiers, run the before and after through the Text Diff Checker to confirm nothing else changed — and if the result is headed into a URL, the URL Encoder handles any remaining special characters.

Frequently asked questions

What are the Title Case rules this tool follows?

It capitalizes every word except short function words — articles, conjunctions and short prepositions like a, an, the, and, of, to, in — which stay lowercase. The first and last words of a line are always capitalized regardless. This matches the convention used by most style guides for headlines and titles, though AP, Chicago and APA differ on the exact small-word list.

What is the difference between camelCase and PascalCase?

Both remove separators and capitalize word boundaries; the only difference is the first letter. camelCase starts lowercase (userName), while PascalCase starts uppercase (UserName). Convention in most languages is camelCase for variables and functions, PascalCase for classes, types and components.

When should I use snake_case vs kebab-case?

snake_case (words joined by underscores) is the norm in Python, Ruby and most database column names. kebab-case (hyphens) appears where underscores are awkward or invalid: URLs, CSS class names, HTML attributes and npm package names. Hyphens are not valid in identifiers in most programming languages, which is why code leans on snake_case instead.

Does the converter preserve line breaks?

Yes. The writing cases transform your text in place without touching line breaks, and the programming cases convert each line independently — so a list of ten headings becomes ten snake_case identifiers, one per line, rather than one long merged string.