Which case to use
| Case | Looks like | Where you’ll usually see it |
|---|---|---|
| Sentence case | The quick brown fox | Body text, buttons and form labels; headlines at many British papers |
| Title Case | The Quick Brown Fox | Titles of books, films and articles; most American headlines |
| UPPER CASE | THE QUICK BROWN FOX | Short labels and warnings. A whole paragraph of it reads like shouting. |
| lower case | the quick brown fox | Tags, usernames, brands that style themselves that way |
| Capitalized Case | The Quick Brown Fox | Like Title Case, but small words get a capital too |
| camelCase | theQuickBrownFox | Variables and functions in JavaScript, Java and Swift |
| PascalCase | TheQuickBrownFox | Class names, and components in React |
| snake_case | the_quick_brown_fox | Python variables and functions, database columns |
| kebab-case | the-quick-brown-fox | Web addresses, CSS class names, file names |
| CONSTANT_CASE | THE_QUICK_BROWN_FOX | Constants and environment variables |
How our Title Case decides
Title case sounds simple until you reach words like “of”, “with” and “vs.” Style guides don’t agree on them, so this is exactly what the converter does:
- The first and last words always get a capital, and so does the first word after a colon or a dash.
- Articles, short conjunctions and short prepositions stay lowercase: a, an, the, and, but, or, nor, for, so, yet, as, at, by, in, of, on, per, to, via, vs.
- Everything else gets a capital, including short words like “is”, “it” and “be”. They’re verbs and pronouns, and every major style guide capitalizes those.
- In a hyphenated word, each part is judged on its own: “long-term” becomes “Long-Term”, while “step-by-step” becomes “Step-by-Step”.
- A word that already has a capital in the middle, like iPhone, eBay or NASA, is left alone.
A few examples of what comes out:
- the lord of the rings: the return of the king → The Lord of the Rings: The Return of the King
- what to do when your code won’t compile → What to Do When Your Code Won’t Compile
- a guide to living with less → A Guide to Living With Less
The last one is where Chicago style differs. It lowercases prepositions of any length, so a Chicago editor would write “Living with Less”.
Sentence case can’t spot names
Sentence case lowercases everything and then capitalizes the start of each sentence. It has no way of knowing that “sarah” is a person or “paris” is a city, so this:
WE MET SARAH IN PARIS. IT RAINED.
comes out as “We met sarah in paris. It rained.” It does fix the word “I” on its own, so “i think i’m late” becomes “I think I’m late”. Give the result a quick read and put the capitals back on names and brands.
Turning phrases into names for code
For the code cases, the converter first works out where each word starts. Spaces, hyphens, underscores and dots all count as breaks, and so does a switch from a lowercase letter to a capital. A run of capitals is kept together as one word, which is how acronyms survive:
| You type | snake_case | camelCase |
|---|---|---|
Customer ID number |
customer_id_number |
customerIdNumber |
getHTTPResponse |
get_http_response |
getHttpResponse |
user-profile.settings |
user_profile_settings |
userProfileSettings |
Capital letters aren’t always one letter
A handful of letters change length when you capitalize them. The German ß has no everyday capital form, so “straße” in UPPER CASE comes out as “STRASSE”. Converting that back to lower case gives “strasse”, not “straße”, so keep your original if the spelling matters.
Turkish is the other one to watch. The converter uses the standard mapping, where a lowercase i becomes a plain I. In Turkish it should become İ, with a dot, so check Turkish text by eye.