Skip to content

Case Converter

Paste an identifier or a phrase and get every naming convention at the same time: camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE, Title Case, Sentence case and dot.case. Handles acronyms correctly instead of splitting them mid-word.

  • 8 naming conventions at once
  • Correct acronym word-splitting
  • Works from any input style
  • Copy any result individually
  • Runs fully client-side

Converter

Converted locally, nothing sent anywhere

camelCase

PascalCase

snake_case

kebab-case

CONSTANT_CASE

Title Case

Sentence case

dot.case

How to convert between naming conventions

  1. 01

    Paste your text

    Enter a variable name, a phrase, or anything with words in it — the source can already be in any convention, or in plain words with spaces.

  2. 02

    Read every conversion

    All eight conventions update at once, so you can see camelCase and CONSTANT_CASE side by side without converting one at a time.

  3. 03

    Copy the one you need

    Each result has its own copy button.

Why word-splitting is the actual hard part

Converting a list of words into a target case is trivial — join with an underscore, or capitalize each one. The genuinely hard part is figuring out where one word ends and the next begins when the input is already someCamelCaseThing or SCREAMING_SNAKE_CASE, and this tool spends most of its logic there, not on the joining.

Explicit separators — underscores, hyphens, dots, spaces — are the easy case. The harder one is an unbroken run like getHTTPStatusCode, where the boundary between "words" is a *change* in letter case, not a character you can split on directly.

The acronym problem

A naive rule — "insert a break before every uppercase letter" — mangles any acronym. Applied to HTMLParser, it produces H, T, M, L, Parser: five words instead of the two a person would actually recognize.

This tool instead treats a run of capital letters as one unit and only breaks it where a new word starts, which is one letter before the last capital in the run if a lowercase letter follows. HTMLParser correctly becomes HTML + Parser; getIDForUser becomes get + ID + For + User.

Acronyms get normalized, not preserved — on purpose

Converting XMLHttpRequest to PascalCase produces XmlHttpRequest, not XMLHttpRequest. This might look wrong at first glance, but it is deliberate and matches the behaviour of the naming-convention libraries most codebases already use, such as change-case and Lodash's camelCase/startCase.

The alternative — trying to detect and preserve "this was originally an acronym" — requires guessing, since by the time the words are separated there is no reliable signal left distinguishing an intentional acronym from a word that simply happened to be all-uppercase. Every case-conversion tool that claims to preserve acronym casing is making the same guess, just less visibly than admitting it here.

When each convention is actually used

camelCase and PascalCase dominate JavaScript, TypeScript, Java and C# — variables and functions in camelCase, classes and types in PascalCase. snake_case is the Python and Rust convention, and it is also what most SQL databases expect for column and table names. kebab-case is standard for URL slugs, HTML attributes and CSS custom properties, since neither underscores nor camelCase are valid in a hostname or CSS identifier without escaping. CONSTANT_CASE signals a constant or an environment variable in nearly every language that has one. dot.case shows up in configuration keys and some structured logging formats.

Frequently asked questions

Why does XMLHttpRequest become XmlHttpRequest instead of staying XMLHttpRequest?

Because converting to a target case normalizes every word to that case's rule, and acronym letters are not a special exception. This matches how mainstream case-conversion libraries like change-case and Lodash behave — preserving "this was an acronym" would require guessing, since that information is not reliably recoverable once the words are split apart.

How does the tool know where one word ends and the next begins?

It looks for explicit separators first — spaces, underscores, hyphens, dots — and where there are none, it splits at case-boundaries: a lowercase letter followed by an uppercase one, and a run of capital letters followed by a capital-then-lowercase pair, which is what correctly separates an acronym like HTML from the word that follows it.

Which case should I use for a URL slug?

kebab-case. Neither underscores nor camelCase are valid in a bare hostname, and search engines have historically treated hyphens as word separators more reliably than underscores in URL paths.

Which case should I use for an environment variable?

CONSTANT_CASE (uppercase with underscores) is close to universal for environment variables and compile-time constants across shells, CI systems and most programming languages.

Does this tool send my text anywhere?

No. Conversion happens entirely in your browser using JavaScript. Nothing you paste is transmitted, logged or stored.

Can I convert from snake_case directly to PascalCase?

Yes — the source convention does not matter. The tool splits the input into words regardless of how they were originally separated, then rebuilds all eight target conventions from that word list at once.

Developers

JWT Decoder

Decode the header and payload of a JWT without the token ever leaving your browser.

Developers

.env Validator

Catch quoting, duplicate and syntax bugs in a .env file before they break your deploy.