What this case converter does
The case converter rewrites text in a different letter case or naming style, and tidies lists line by line. It saves retyping a heading that was written in capitals, turns a list of field names into variable names, and cleans up data copied from spreadsheets, emails or PDFs. There are fourteen transformations in three groups:
- Letter case: UPPERCASE, lowercase, Capitalize Each Word, Title Case (headline style) and Sentence case.
- Code naming styles: camelCase, PascalCase, snake_case and kebab-case.
- Line tools: trim and collapse spaces, remove blank lines, remove duplicate lines, and sort lines A to Z or Z to A.
How to use it
- Paste your text into the box.
- Choose a transformation. The result appears below and changes as soon as you pick another option.
- Press Copy to copy the result, or select it by hand.
The rules behind each option
Title Case (headline style)
Every word is capitalized except short articles, conjunctions and prepositions: a, an, and, as, at, but, by, for, if, in, nor, of, off, on, or, per, so, the, to, up, via, vs and yet. These stay lowercase unless they are the first or last word, or follow a colon. This matches the common rule in English headline styles; individual style guides differ on longer prepositions such as "with" or "about", which this tool capitalizes.
Sentence case
The text is lowercased, then the first letter of the text, of each line and of each new sentence is capitalized. A new sentence starts after a full stop, question mark or exclamation mark followed by a space. The pronoun "i" on its own becomes "I".
Code naming styles
Each line is treated as one name. Words are split at spaces, punctuation and existing case changes, and apostrophes inside words are dropped, so "don't" becomes "dont" rather than two words. Acronyms are recognized inside camelCase input: "XMLHttpRequest" splits into xml, http and request.
| Style | "user ID number" becomes | Typical use |
|---|---|---|
| camelCase | userIdNumber | JavaScript and Java variables |
| PascalCase | UserIdNumber | Class and component names |
| snake_case | user_id_number | Python, SQL columns |
| kebab-case | user-id-number | URLs, CSS classes, file names |
Line tools
Trim and collapse removes spaces and tabs at both ends of each line and turns runs of spaces inside a line into one space. Remove duplicate lines keeps the first copy of each line and is exact, so case and spacing matter. Sorting uses natural order and ignores case, so "item 2" comes before "item 10".
Worked examples
Fixing a shouted headline
"THE LORD OF THE RINGS: THE RETURN OF THE KING" with Title Case gives "The Lord of the Rings: The Return of the King". The second "The" stays capitalized because it follows a colon.
Column names to variables
Three lines, "First Name", "Date of Birth" and "Postal Code", become firstName, dateOfBirth and postalCode in camelCase, or first_name, date_of_birth and postal_code in snake_case.
Cleaning an email list
A pasted list of 120 lines with blank lines and repeats can be cleaned in three passes: Trim and collapse spaces, Remove blank lines, then Remove duplicate lines. Finish with Sort lines A to Z.
Tips and common mistakes
- Restore acronyms and brand names. Case conversion lowercases first, so NASA becomes Nasa and iPhone becomes Iphone in Title Case. Fix these by hand.
- Sentence case cannot spot names. "I met Anna in Paris" becomes "I met anna in paris". Proper nouns need a manual pass.
- Trim before removing duplicates. "apple" and "apple " are different lines until the trailing space is removed.
- Mind other languages. Lowercasing follows Unicode rules, which do not cover every language-specific case, such as the Turkish dotted and dotless i.
Limits and privacy
The tool accepts up to 10 MB of text; the output box shows the first 2 million characters. It changes characters and whitespace only and does not check grammar or spelling. Everything runs in your browser and nothing you paste is sent or stored.