How to change text case
- Type or paste your text into the box.
- Click one of the eleven case buttons. The text in the box is replaced by the converted version straight away.
- Click Copy to copy the result. If it isn't what you wanted, Undo brings back the text from before your last click. It remembers one step only, so undo before trying a second conversion. Clear can be undone the same way.
The eleven cases at a glance
| Button | “the lord of the rings” becomes | Typical use |
|---|---|---|
| UPPERCASE | THE LORD OF THE RINGS | Short headings, labels, warnings |
| lowercase | the lord of the rings | Normalising email addresses, tags and keywords |
| Title Case | The Lord of the Rings | Headlines, book, film and song titles |
| Sentence case | The lord of the rings | Fixing text typed in capitals, interface labels |
| camelCase | theLordOfTheRings | Variables and functions in JavaScript and Java, JSON keys |
| PascalCase | TheLordOfTheRings | Class, type and component names |
| snake_case | the_lord_of_the_rings | Python and Ruby names, database columns |
| kebab-case | the-lord-of-the-rings | URL slugs, CSS classes, file names |
| CONSTANT_CASE | THE_LORD_OF_THE_RINGS | Constants and environment variables |
| aLtErNaTiNg | tHe LoRd Of ThE rInGs | Jokes and mocking memes |
| iNVERSE cASE | THE LORD OF THE RINGS | Repairing text typed with Caps Lock on |
Inverse case flips every letter, so it is the quickest fix when Caps Lock was on by mistake: cAPS lOCK IS oN becomes Caps Lock is On. Alternating case starts with a lowercase letter and skips spaces and punctuation when it alternates.
How the programming cases split words
camelCase, PascalCase, snake_case, kebab-case and CONSTANT_CASE first break each line into words, then join them again with the new style. Words are separated at spaces, punctuation and existing case changes, so you can convert from one naming style to another, not just from plain text:
getUserName→ snake_caseget_user_nameXMLHttpRequest→ snake_casexml_http_request: a run of capitals is split before the capital that starts the next word.user account ID→ camelCaseuserAccountId: acronyms are treated as ordinary words.Total Price (USD)→ snake_casetotal_price_usd: symbols such as brackets and currency signs are dropped, because most programming languages don't allow them in names.version2Update→ snake_caseversion2_update: digits stay attached to the word before them.
Each line is converted separately. Paste a column of field labels such as first name, last name and date of birth on separate lines and one click gives firstName, lastName and dateOfBirth.
Which convention goes where?
Python's style guide, PEP 8, uses snake_case for functions and variables, PascalCase for classes and CONSTANT_CASE for constants. JavaScript and Java use camelCase for variables and methods and PascalCase for classes. CSS class names and URL slugs are usually kebab-case; for URLs, Google recommends hyphens rather than underscores to separate words. Environment variables such as NODE_ENV are conventionally written in CONSTANT_CASE. Whatever you pick, follow the convention already used in the project.
Title Case rules used here
Every word is capitalised except these short words, which stay lowercase unless they open the line: a, an, and, as, at, but, by, for, in, nor, of, off, on, or, per, so, the, to, up, via, vs, yet. Hyphenated words get a capital after the hyphen (Well-Known). Style guides disagree on the details: AP style capitalises words of four letters or more, while the Chicago Manual of Style lowercases all prepositions but always capitalises the last word. This tool does not force the last word up, so what are you looking for becomes What Are You Looking for; fix such endings by hand if your style guide requires it.
Pitfalls to watch for
- Acronyms and brand names are flattened. Title Case turns “NASA launches a new rocket” into “Nasa Launches a New Rocket”, and Sentence case lowercases names such as London. Check proper nouns afterwards.
- Apostrophes split words in the programming cases:
don't stopbecomesdonTStopin camelCase. Delete apostrophes before converting. - Case changes are not always reversible. German straße becomes STRASSE in uppercase, and lowercasing that gives strasse, not the original word.
- Language-specific rules are not applied. The conversion uses general Unicode case mappings, so the Turkish dotted İ is not produced from i.
FAQ
Does it work with accented letters and other alphabets?
Yes. Accented Latin letters, Greek and Cyrillic all have upper- and lowercase forms and convert correctly. Scripts without case, such as Chinese, Japanese, Korean, Arabic and Hebrew, are left unchanged, although the programming cases still turn the spaces between words into underscores or hyphens.
Can I convert a whole list at once?
Yes. Paste one item per line; every case keeps the line breaks. To tidy the list further, use Sort Lines or Remove Duplicate Lines.
Why did numbers or symbols disappear in snake_case?
Digits are kept, but punctuation and symbols are treated as word separators and removed, because they are not valid in most variable names. Use UPPERCASE or lowercase if you need to keep them.
Should URLs use hyphens or underscores?
Hyphens. kebab-case slugs such as /case-converter are easy to read, and search engines treat the hyphen as a word separator.