Skip to main content
CC

Case Converter

Convert text to UPPERCASE, Title Case, camelCase, snake_case and 6 other formats at once.

Did you like the tool? Thanks!
Share:

How to Use Case Converter

Type or paste text into the box and see it instantly converted into ten different case styles side by side: UPPERCASE, lowercase, Title Case, Sentence case, camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE and aLtErNaTiNg CaSe. Each result has its own Copy button. Useful for renaming variables, generating slugs, or reformatting a heading you pasted from somewhere else. Runs entirely in your browser.

About Case Converter

Different contexts expect text in different case conventions, and manually retyping a phrase into camelCase or CONSTANT_CASE is both tedious and error-prone. Developers rename things between naming conventions constantly — a database column in snake_case needs to become a JavaScript variable in camelCase, a class name needs PascalCase, an environment variable needs CONSTANT_CASE — while writers and editors more often need Title Case for headings or Sentence case for cleaning up text that was typed in all caps. This tool computes all ten conversions from a single input simultaneously, so you can see and copy whichever one you actually need without re-running a conversion for each format. The five simple, character-level conversions — UPPERCASE, lowercase, Title Case, Sentence case and aLtErNaTiNg CaSe — work directly on the text as typed, including its existing spacing and punctuation. UPPERCASE and lowercase are straightforward. Title Case capitalizes the first letter of every whitespace-separated word and lowercases the rest (this tool intentionally does not implement the more elaborate style-guide rule of keeping short connector words like "of" or "the" lowercase — every word is capitalized the same simple way, which is predictable and covers the common case well). Sentence case lowercases everything and then capitalizes only the first letter of the whole text and the first letter following each `.`, `!` or `?`, mimicking normal sentence capitalization. aLtErNaTiNg CaSe toggles the case of every letter in sequence, skipping over spaces and punctuation without breaking the alternating rhythm — so a space in the middle of the phrase does not reset the pattern back to lowercase. The five programmatic-case conversions — camelCase, PascalCase, snake_case, kebab-case and CONSTANT_CASE — are different in kind: they all first break the input into individual words using a single shared `splitWords()` helper, then reassemble those words with different casing and different separators. Getting the word-splitting step right is the crux of making these conversions actually useful on realistic input, because text pasted into a case converter rarely arrives as clean, single-style words. `splitWords()` handles three separate cases in sequence: it treats existing hyphens and underscores as word separators (so "example-text" or "my_variable" split the same way spaces do), it inserts a boundary wherever a lowercase letter or digit is immediately followed by an uppercase letter (so "helloWorld" splits into "hello" and "World"), and it inserts a boundary between a run of uppercase letters and a following capitalized word (so an acronym like "HTTPServer" splits into "HTTP" and "Server" rather than "H", "T", "T", "P", "Server"). This means a mixed input like "helloWorld example-text" or "my_HTTPRequest-handler" splits sensibly into clean words before being reassembled, instead of producing a mangled result the way a naive single-rule splitter would. Once split, camelCase lowercases the first word entirely and capitalizes the first letter of every subsequent word, joining them with no separator; PascalCase capitalizes every word's first letter and joins with no separator; snake_case lowercases every word and joins with underscores; kebab-case lowercases every word and joins with hyphens; and CONSTANT_CASE (also known as SCREAMING_SNAKE_CASE) uppercases every word and joins with underscores. Because all five share the same `splitWords()` word list, they always agree with each other about where one word ends and the next begins — converting the same input to snake_case and then to camelCase will always represent the identical word boundaries, just formatted differently.

Details & Tips

The shared `splitWords(str)` helper applies three transformations in order: (1) replace runs of hyphens/underscores with a space, (2) insert a space between a lowercase letter/digit and a following uppercase letter (`([a-z0-9])([A-Z])` boundary), (3) insert a space between a run of uppercase letters and a following capitalized word (`([A-Z]+)([A-Z][a-z])` boundary, which correctly splits an acronym like "HTTP" off of "HTTPServer" as "HTTP" + "Server"). The result is trimmed and split on whitespace to produce the final word list. Worked example 1 — input `helloWorld example-text`: splitWords produces `["hello", "World", "example", "text"]`. camelCase → `helloWorldExampleText`; PascalCase → `HelloWorldExampleText`; snake_case → `hello_world_example_text`; kebab-case → `hello-world-example-text`; CONSTANT_CASE → `HELLO_WORLD_EXAMPLE_TEXT`. Worked example 2 — input `HTTPServerName`: splitWords produces `["HTTP", "Server", "Name"]` (the acronym boundary rule keeps "HTTP" together instead of splitting it letter by letter). camelCase → `httpServerName`; snake_case → `http_server_name`. Worked example 3 — aLtErNaTiNg CaSe on the input `hello world`: a running letter index starts at 0 and only increments on actual letters (the space is passed through unchanged without incrementing it), toggling lowercase on even indices and uppercase on odd indices: h=0(lower), e=1(upper), l=2(lower), l=3(upper), o=4(lower), [space, skipped], w=5(upper), o=6(lower), r=7(upper), l=8(lower), d=9(upper) — producing `hElLo WoRlD`. Worked example 4 — Sentence case on `THIS IS SHOUTING. this needed fixing!`: the whole string is lowercased first, then the first letter of the text and the first letter after each `.`/`!`/`?` are capitalized, producing `This is shouting. This needed fixing!`. What is NOT implemented: Title Case does not keep short connector words ("a", "of", "the", "and") lowercase the way some editorial style guides do — every word is capitalized identically, which is simpler and more predictable than trying to guess which style guide you want. camelCase/PascalCase/snake_case/kebab-case/CONSTANT_CASE all discard the original spacing and punctuation entirely, since a programmatic identifier cannot contain spaces or most punctuation — only the underlying words survive the conversion, not any surrounding symbols. All ten results update live on every keystroke, and each has its own Copy button that copies just that one result to your clipboard.

Frequently Asked Questions

How does the converter decide where one word ends and the next begins for camelCase/snake_case/etc.?
A shared word-splitting helper treats spaces, hyphens and underscores as separators, and also detects camelCase/PascalCase boundaries (a lowercase letter followed by an uppercase letter) and acronym boundaries (a run of capitals followed by a capitalized word), so mixed input like "helloWorld example-text" splits into sensible individual words before being reassembled.
Does Title Case keep small words like "of" or "the" lowercase?
No, every word is capitalized the same simple way. Some style guides keep short connector words lowercase in titles, but this tool uses one consistent, predictable rule instead of guessing which style guide you want.
What is the difference between camelCase and PascalCase?
camelCase lowercases the first word entirely and capitalizes the first letter of every word after that (e.g. helloWorld). PascalCase capitalizes the first letter of every word including the first one (e.g. HelloWorld).
What is CONSTANT_CASE used for?
Also known as SCREAMING_SNAKE_CASE, it is the conventional format for constants and environment variables in most programming languages, e.g. MAX_RETRY_COUNT.
How does aLtErNaTiNg CaSe handle spaces and punctuation?
Only letters are toggled between upper and lower case; spaces and punctuation are passed through unchanged and do not reset or interrupt the alternating pattern.
Will an acronym like "HTTPServer" be split letter by letter?
No, the word splitter specifically detects a run of capital letters followed by a capitalized word and keeps the acronym intact, splitting "HTTPServer" into "HTTP" and "Server" rather than one letter at a time.
Does the converter preserve punctuation in the programmatic-case outputs?
No. camelCase, PascalCase, snake_case, kebab-case and CONSTANT_CASE are identifier formats that cannot contain spaces or most punctuation, so only the underlying words are kept — surrounding symbols like commas or parentheses are dropped from those five outputs.
Does Sentence case handle multiple sentences correctly?
Yes, the first letter after each period, exclamation mark or question mark is capitalized, in addition to the very first letter of the text, and everything else is lowercased.
Can I copy just one of the ten results?
Yes, each result block has its own Copy button that copies only that result to your clipboard.
Is my text uploaded anywhere?
No, every conversion runs locally in your browser using JavaScript as you type. Nothing is sent to a server.
What happens with numbers in the input, like "step2Complete"?
Digits are treated like lowercase letters for boundary detection, so "step2Complete" splits into "step2" and "Complete" (the boundary rule looks for a lowercase-letter-or-digit followed by an uppercase letter).
Does this handle accented or non-English letters?
Basic character-level conversions (UPPERCASE, lowercase, Title Case) use JavaScript's built-in case conversion, which handles most accented Latin letters correctly. The camelCase-style boundary detection is based on the ASCII a-z/A-Z ranges, so word-splitting on accented letters may be less precise than on plain English text.

Also Available As

case converter, text case converter, camelcase converter, snake case converter, kebab case converter, title case converter, uppercase lowercase converter, constant case

Found a Problem?

Let us know if something with Case Converter isn't working as expected.

Thanks — we'll take a look.