Case converter

Switch any text between UPPERCASE, Title Case, camelCase, snake_case and seven more styles — instantly in your browser.

0 words 0 characters
Choose a case style
Your converted text will appear here.

Every text case, explained

A “case style” is simply a set of rules for which letters are capitalised and how words are joined. Choosing the right one matters more than it sounds: headlines read better in Title Case, URLs and CSS classes expect kebab-case, Python variables prefer snake_case, and JavaScript leans on camelCase. Retyping a sentence by hand to switch between them is slow and error-prone — this converter applies the exact rule for you the moment you type.

How the conversion works

The two simple styles, UPPERCASE and lowercase, are a direct call to the browser’s Unicode-aware toUpperCase() and toLowerCase(), so even accented letters convert correctly. The display styles add a rule on top:

  • Title Case capitalises the first letter of every word: match the first letter at each word boundary with the Unicode pattern \b\p{L} and upper-case it, leaving spaces and punctuation untouched.
  • Sentence case lower-cases everything, then capitalises the first letter of the text and the first letter that follows a sentence end — a ., ! or ? followed by whitespace — using the pattern (^\s*|[.!?]\s+)(\p{L}).
  • aLtErNaTiNg walks the string letter by letter, upper-casing even positions and lower-casing odd ones.

The four “programmer” styles all share one step: split the text into words. The converter breaks on spaces, punctuation and case boundaries with the pattern [^A-Za-z0-9]+ (plus a split between a lowercase and an uppercase letter, so oldHTML is read as two words). It then re-joins those words by the rule for each style, shown below.

The ten styles at a glance

StyleRule“hello world example”
UPPERCASEEvery letter capitalHELLO WORLD EXAMPLE
lowercaseEvery letter smallhello world example
Title CaseFirst letter of each wordHello World Example
Sentence caseFirst letter of each sentenceHello world example
camelCaseJoin words, lower firsthelloWorldExample
PascalCaseJoin words, capital firstHelloWorldExample
snake_caselower, underscoreshello_world_example
kebab-caselower, hyphenshello-world-example
CONSTANT_CASEUPPER, underscoresHELLO_WORLD_EXAMPLE
aLtErNaTiNgFlip case each letterhElLo wOrLd eXaMpLe

A worked example

Take the phrase "Color of the Sky". Title Case capitalises the first letter of every word and gives "Color Of The Sky". To make a CSS class you want kebab-case: the splitter produces the four words color, of, the and sky, each lower-cased and joined with hyphens into color-of-the-sky. Feed the same four words to camelCase — lowercase the first word, capitalise the start of the rest, and join with no separator — and you get the variable name colorOfTheSky, ready to paste straight into your code. PascalCase would capitalise the first word too, giving ColorOfTheSky.

Privacy note: this converter runs entirely in your browser with no server and no analytics on your input. Whatever you type stays on your device and is never uploaded, logged or stored.

Frequently asked questions

What is the difference between camelCase and PascalCase?

Both join words without spaces and capitalise the start of each word, but they differ on the very first letter. camelCase keeps the first word lowercase (firstName), while PascalCase capitalises it too (FirstName). camelCase is common for variables and functions; PascalCase is typical for class and component names.

How does Title Case differ from Sentence case?

Title Case capitalises the first letter of every word — "The Quick Brown Fox". Sentence case only capitalises the first letter of each sentence and leaves the rest lowercase — "The quick brown fox." Title Case suits headings; Sentence case suits ordinary prose.

When should I use snake_case, kebab-case or CONSTANT_CASE?

snake_case (words_joined_by_underscores) is popular in Python and database columns. kebab-case (words-joined-by-hyphens) is the standard for URLs, CSS classes and file names. CONSTANT_CASE (UPPER_SNAKE) is the convention for fixed values and environment variables in most languages.

Does the converter keep my numbers and accented letters?

Yes. Digits are preserved in every mode, and accented or non-Latin letters are upper- and lower-cased correctly using your browser’s built-in Unicode rules. Programmer styles such as snake_case strip spaces and punctuation but keep the underlying letters and numbers intact.

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

There is no fixed limit. Because everything runs on your own device, the only ceiling is your browser’s memory. Pasting many thousands of words converts instantly with no upload or wait.

Is my text sent anywhere?

No. The conversion happens entirely in your browser with JavaScript. Your text is never uploaded, logged or stored on a server — close the tab and it is gone.