What is a case converter?
A case converter changes the capitalization of text without retyping it. This one takes whatever you paste and shows it in eight styles at once: UPPERCASE, lowercase, Title Case and Sentence case for writing, plus camelCase, PascalCase, snake_case and kebab-case for code, file names and URLs. It updates live as you type.
How to convert text case
- Type or paste text into the input box. The output updates as you type.
- Find the line for the case you want. Each line starts with its label, such as
snake_case:. - Copy the result. Copy copies all eight lines, so select just the part you need if you only want one.
For example, the quick brown_fox jumps-over produces:
UPPERCASE: THE QUICK BROWN_FOX JUMPS-OVER
lowercase: the quick brown_fox jumps-over
Title Case: The Quick Brown_fox Jumps-over
Sentence case: The quick brown_fox jumps-over
camelCase: theQuickBrownFoxJumpsOver
PascalCase: TheQuickBrownFoxJumpsOver
snake_case: the_quick_brown_fox_jumps_over
kebab-case: the-quick-brown-fox-jumps-over
Notice the split. The four writing cases leave underscores and hyphens in place, while the four programming cases treat them as word breaks.
What each case is for
| Case | Example | Common uses |
|---|---|---|
| UPPERCASE | GET USER BY ID |
Short labels, warnings, SQL keywords |
| lowercase | get user by id |
Email addresses, tags, normalizing data before comparing |
| Title Case | Get User By Id |
Headings, button labels, product names |
| Sentence case | Get user by id |
Body text, UI messages, most modern headings |
| camelCase | getUserById |
JavaScript and Java variables and functions |
| PascalCase | GetUserById |
Class names, React components, C# methods |
| snake_case | get_user_by_id |
Python variables, database columns |
| kebab-case | get-user-by-id |
URLs and slugs, CSS class names, file names |
Style guides and languages have their own conventions. Python's PEP 8, for instance, uses snake_case for functions and variables and CapWords (PascalCase) for classes.
How each conversion works
Knowing the rules helps you predict the output, especially for text that's already partly formatted.
- UPPERCASE and lowercase use the browser's standard
toUpperCase()andtoLowerCase(), which handle accented and non-Latin letters. A few letters change length: GermanstraßebecomesSTRASSE. - Title Case capitalizes the first letter of every word and lowercases the rest.
a tale of two citiesbecomesA Tale Of Two Cities, andNASA launched the iPhone appbecomesNasa Launched The Iphone App. - Sentence case lowercases everything, then capitalizes the first letter of the text and the first letter after each
.,!or?.i met Anna in paris. she said hi!becomesI met anna in paris. She said hi!, so names need fixing afterwards. - camelCase, PascalCase, snake_case and kebab-case split the text into words on spaces, underscores and hyphens, drop empty pieces, lowercase each word, and join them. Extra spaces at the start, end or between words disappear:
spaced out textbecomesspaced_out_text.
Limitations to watch for
- Existing camelCase isn't split.
getUserNamehas no spaces, underscores or hyphens, so every programming case returnsgetusername. Typeget user nameinstead. - Punctuation stays in.
Hello, world!becomeshello,World!in camelCase andhello,_world!in snake_case. Remove commas, full stops and other punctuation first if you need a clean identifier or slug. Find and replace with a regular expression can strip them in one go. - Words that start with an accented letter. Title Case only recognizes unaccented English letters, digits and underscores as the start of a word, so
élan vitalcomes out aséLan Vital. Sentence case leaves a leadingélowercase. UPPERCASE and lowercase aren't affected. - Short words in titles. Every word gets a capital, so headline styles that keep "a", "and" or "of" lowercase need a manual pass.
Related text tools
To check the length of what you've converted, use the word counter. If you're cleaning up a list, the text sorter puts lines in order, and a lowercase pass before removing duplicate lines catches entries that differ only in capitalization.
Last updated