Case Converter
Enter text and pick a case style to convert it instantly.
How the conversion works
The converter first tokenizes your text into words: it breaks at every space, hyphen, underscore and other non-alphanumeric character, and also at camelCase boundaries — a transition from lowercase to uppercase starts a new word. Those tokens are then re-joined in the style you pick, changing only letter case and separators. The default input "hello world" becomes two tokens, so camelCase mode outputs helloWorld, snake_case outputs hello_world and PascalCase outputs HelloWorld.
The camel-boundary rule is what makes round trips work. Feeding "myVariableName" back through the tool yields three tokens — my, Variable, Name — because each lowercase-to-uppercase transition splits. Runs of capitals stay together, so "parseJSON" tokenizes as parse and JSON, not letter by letter.
All seven outputs for the default input
| Style | Output for "hello world" | Where it is conventional |
|---|---|---|
| UPPERCASE | HELLO WORLD | Constants, environment variables |
| lowercase | hello world | Plain text, some slugs |
| Title Case | Hello World | Headings, book titles |
| camelCase | helloWorld | JavaScript variables, Java methods |
| PascalCase | HelloWorld | Class names, React components |
| snake_case | hello_world | Python, SQL columns, config keys |
| kebab-case | hello-world | URLs, CSS classes, file names |
The table doubles as a style cheat sheet. Most ecosystems enforce one style mechanically — linters flag a snake_case function in a camelCase codebase — so converting at paste time is cheaper than re-naming after the fact.
How the tokenizer handles tricky input
Acronyms and capitals runs
A capital run such as URL or JSON is kept as a single word, so it never splits letter by letter. "parseJSON" tokenizes as parse and JSON — snake_case output is parse_json, with the acronym lowercased as a unit. The reverse direction is not fully recoverable: camelCase mode rebuilds the second token as Json, capitalizing only its first letter, which is the classic way acronym round trips drift. PascalCase input like "UserProfilePage" tokenizes cleanly into User, Profile and Page, ready to become user_profile_page in snake_case.
Numbers and mixed tokens
Digits are word characters, so "user2" and "v10Beta" stay whole, with the lowercase-to-uppercase transition inside "v10Beta" splitting it into v10 and Beta. Non-ASCII letters fall outside the A-to-Z detection, so accented words are treated as separators — a limitation worth knowing before converting multilingual text, where an accented character silently ends a token.
Why each style exists where it does
- camelCase avoids spaces without adding characters, which keeps JavaScript identifiers compact and legal
- snake_case reads at a glance in lowercase-heavy languages like Python and SQL, where underscores survive case-folding
- kebab-case is URL-safe because hyphens are word separators for search engines while underscores are not
- PascalCase marks types and classes visually, so a reader can tell a constructor from a function at sight
- UPPERCASE signals immutability — constants and environment variables are shouting by convention
Round trips and what survives them
The separator-based styles preserve structure. Take "UserProfilePage", convert to snake_case to get user_profile_page, then convert back: the underscores re-tokenize into the same three words and PascalCase rebuilds UserProfilePage exactly. That reversibility is why snake_case is the lingua franca of data interchange — a Python backend and a JavaScript frontend can both hold the value in their native style and recover the other side without loss.
camelCase is the one style that loses information, because the original separators vanish into the casing. Once "user profile name" becomes userName, no conversion can tell whether the source was "user-name", "user_name" or "userName" — all three tokenize identically. If a value may need to be re-formatted later, keep it in a separated style and convert at the boundary where each language needs its own case.
Choosing a style for a new project
- Match the language first: JavaScript camelCase, Python snake_case, Go camelCase, SQL snake_case, CSS kebab-case — deviation costs review friction forever
- Match the wire format second: JSON APIs overwhelmingly ship snake_case or camelCase keys, and converters sit at the client boundary
- Match the platform for URLs and files: kebab-case, because search engines treat hyphens as word separators and underscores as glue
- Pick one convention per layer and enforce it with a linter rather than vigilance
Common mistakes when converting
- Feeding kebab-case URLs into Title Case and expecting sentence case — every token is capitalized, including short words like "the"
- Assuming Title Case follows headline rules — this converter capitalizes every word, while style guides lowercase articles and prepositions
- Converting identifiers with non-ASCII characters, which split at the accent instead of staying whole
- Expecting "ABC" to become abc in camelCase mode — the capital run stays one word and lowercases to abc as a unit
For slugs specifically — where you also want to strip stopwords, trim length and handle punctuation — the dedicated Slug Generator goes further than kebab-case conversion, and the String Length Calculator checks the byte cost of the result before it goes into a URL.
Frequently asked questions
What does "hello world" become in each case style?
UPPERCASE gives HELLO WORLD, Title Case gives Hello World, camelCase gives helloWorld, PascalCase gives HelloWorld, snake_case gives hello_world and kebab-case gives hello-world.
Does it handle camelCase input?
Yes. Each lowercase-to-uppercase transition is treated as a word boundary, so "myVariableName" splits into my, Variable and Name before re-joining in your chosen style.
What happens to acronyms like JSON or URL?
A run of capitals is kept as a single word, so "parseJSON" tokenizes as parse and JSON rather than letter by letter. In snake_case that yields parse_json, with the acronym lowercased as a unit.
Are numbers preserved?
Yes. Digits are word characters, so "user2" and "v10Beta" keep their numbers, with "v10Beta" splitting at the capital B into v10 and Beta.
Why does my accented word disappear from the output?
The tokenizer detects only A-to-Z letters and digits, so accented characters act as separators rather than word characters. "café" splits at the accented e, leaving ca in the output.
Does Title Case follow headline rules?
No. Every word is capitalized, including short words like "of" and "the" that style guides would lowercase. Use it for headings where every-word capitalization is the goal.
Can I convert snake_case straight to kebab-case?
Yes. Both separators and camel boundaries split words, so "user_profile_name" tokenizes into user, profile and name and re-joins as user-profile-name.
Is the conversion reversible?
Between kebab, snake and Pascal forms, yes — the separators preserve every boundary, so user_profile_page and UserProfilePage round-trip cleanly. Converting to camelCase or lowercase loses the original separators, so those directions are not reversible.
Which style should URLs use?
kebab-case. Search engines treat hyphens as word separators while underscores glue words together, so hello-world reads as two terms and hello_world as one — a measurable difference in how queries match the page.
Method and sources
- Common programming identifier naming conventions.