Case converter

Type or paste text once and see it converted to every common case at the same time — UPPERCASE, lowercase, Title Case, Sentence case, camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE, dot.case and aLtErNaTiNg cAsE — with live character and word counts and a copy button on every row.

How it works

Two things have to happen before text can be re-cased: the input has to be split into individual words, and each output case then joins those words back together its own way.

Splitting into words

  • Runs of spaces, underscores and hyphens are always word breaks, however many appear together — hello___world--foo tokenises the same as hello world foo.
  • A lowercase letter (or digit) immediately followed by an uppercase letter is a break — this is what lets the tool split already-camelCased input: helloWorldhello, World.
  • A run of capitals followed by a capital-then-lowercase pair is treated as an acronym boundary — XMLParserXML, Parser.
  • Letters and digits are split from each other in both directions — state2Valuestate, 2, Value.
  • Anything left over — commas, periods, apostrophes, emoji — is treated as a separator and dropped from the word list.

UPPERCASE, lowercase and aLtErNaTiNg cAsE skip this step entirely: they transform the raw string character by character, so punctuation and spacing come through unchanged. Sentence case works on the raw string too, but adds sentence-boundary detection instead of word-boundary detection.

Joining words back together

Case name, how words are joined, a worked example and where it is typically used
CaseJoined byhello world becomesTypically used for
UPPERCASEHELLO WORLDEmphasis, acronyms, print headings
lowercasehello worldNormalising shouted or mixed-case text
Title CasespaceHello WorldHeadings, book and film titles
Sentence caseHello worldTurning ALL CAPS or random casing back into prose
camelCasenone, 2nd+ word capitalisedhelloWorldJavaScript / Java / C# variables and functions
PascalCasenone, every word capitalisedHelloWorldClasses, components, types
snake_case_hello_worldPython and Ruby identifiers, database columns
kebab-case-hello-worldURL slugs, CSS class names, HTML attributes
CONSTANT_CASE_, all capsHELLO_WORLDEnvironment variables, compile-time constants
dot.case.hello.worldConfig keys, some npm package namespacing
aLtErNaTiNg cAsEhEllo wOrldInformal, sarcastic emphasis (the "mocking" meme style)

Use cases & limitations

Where this is genuinely useful

  • Renaming a variable across conventions. Paste a Python snake_case name to get its JavaScript camelCase or C# PascalCase equivalent instantly, instead of retyping and re-capitalising by hand.
  • Turning a heading into a slug. Paste a page title and take the kebab-case row straight into a URL path.
  • Fixing text pasted from a shouty source. All-caps email quotes or scraped text convert cleanly back to Sentence case.
  • Environment variable names. Type a descriptive phrase and copy the CONSTANT_CASE row directly into a .env file or Docker Compose config.
  • Checking all conventions at once. When you are not sure which case a style guide wants, having all eleven side by side settles it in seconds.

What this tool cannot do

  • It has no dictionary of known acronyms. It detects the pattern of an acronym (capitals followed by a capitalised word) but does not know that, say, "URL" or "ID" should stay uppercase inside an otherwise lowercase output — snake_case will render URL as url, which is usually what you want and occasionally is not.
  • Punctuation is dropped, not encoded, in tokenised outputs. An apostrophe, comma or em dash in your input will not appear in Title Case, camelCase, snake_case, kebab-case, CONSTANT_CASE or dot.case — those cases assume you are converting identifiers or headings, not preserving prose verbatim. UPPERCASE, lowercase and aLtErNaTiNg cAsE keep every character exactly as typed.
  • Non-Latin scripts are best-effort. Case conversion is a Latin-alphabet concept; scripts with no upper/lower distinction (most CJK text, for example) pass through unchanged in the whole-string cases and may not tokenise the way you expect in the word-based ones.
  • It does not validate identifiers. The output is not checked against any specific language's rules for what a legal variable name is (leading digits, reserved words, length limits) — that is left to you or your linter.

Frequently asked questions

What is the difference between camelCase and PascalCase?

Both join words with no separator and capitalise the start of every word after the first. The only difference is the very first letter: camelCase leaves it lowercase (helloWorld), PascalCase capitalises it too (HelloWorld). JavaScript, Java and C# variables and function names conventionally use camelCase; class and component names in the same languages conventionally use PascalCase.

How does the tool decide where one word ends and another begins?

Spaces, underscores and hyphens are always treated as word breaks, however many run together. On top of that, the tool looks for casing boundaries inside a single run of letters: a lowercase letter followed by an uppercase one (helloWorld → hello, World), and a run of capitals followed by a capital-then-lowercase pair, which catches acronyms (XMLParser → XML, Parser). Letters and digits are also split apart from each other. That means you can paste already-cased text — camelCase, snake_case, an acronym-heavy identifier — and every output case is rebuilt correctly from the same word list, not just re-cased letter by letter.

Why does Sentence case look different from Title Case?

Title Case capitalises the first letter of every word: “Hello World”. Sentence case treats the input as prose: it lowercases everything, then capitalises only the first letter of the string and the first letter after a run of . ! or ? followed by whitespace: “Hello world. This is fine? Yes!”. Title Case is for headings and proper-noun-style labels; Sentence case is for turning a shouted or randomly-cased sentence back into normal prose.

Does it handle acronyms and abbreviations correctly?

It handles the common pattern — a run of capitals followed by a capitalised word, such as XMLParser or HTTPRequest — by splitting after the last capital in the run, giving XML/Parser and HTTP/Request. It cannot know that an acronym should stay uppercase in an output that is otherwise lowercase (snake_case turns XML into xml, not XML), because the tool has no dictionary of known acronyms — it works purely from capitalisation patterns. If you need a specific acronym preserved verbatim, edit that one word after converting.

What happens with numbers, punctuation and non-English text?

Digits are split from surrounding letters and treated as their own token, so state2Value becomes state / 2 / Value in every case. Punctuation such as commas, apostrophes and periods is treated as a word separator and dropped from the tokenised outputs (Title Case, camelCase, snake_case and so on) — don't stop tokenises as don / t / stop. UPPERCASE, lowercase and aLtErNaTiNg cAsE work on the raw string instead, so they preserve punctuation exactly. Accented Latin letters (café, naïve) are treated as ordinary letters by most browsers' regular-expression engines and convert as expected; scripts with no concept of upper/lower case, or no built-in word boundaries, are best-effort and may not split the way you want.

Which case should I use for a URL, a CSS class, or an environment variable?

kebab-case for URL slugs and CSS class names — hyphens are the only word separator every browser and server treats consistently in a URL path, and CSS identifiers cannot contain underscores in some very old tooling. snake_case is the Python and Ruby convention for variables and function names, and is also common in database column names. CONSTANT_CASE is the near-universal convention for environment variables and compile-time constants across shells, Docker, and most language ecosystems. camelCase is standard for JavaScript, Java and C# variables; PascalCase for classes and components in the same languages.

Is my text uploaded anywhere when I convert it?

No. What you type never leaves your device — every conversion runs as plain JavaScript in your own browser, with no server call involved. There is nothing to sign in to and nothing saved between visits; reloading the page clears the text box.

Is there a limit on how much text I can convert?

No hard limit is enforced, but this is built for identifiers, headings, filenames and short passages, not for reformatting an entire manuscript. Because the conversion runs in your browser on every keystroke, extremely long input (tens of thousands of words) will feel slower to update than a short one — the debounce delay smooths out typing, but the underlying regular expressions still have to scan the whole string each time.

Go deeper