Case conversion is not one operation but seven, and they exist because different contexts need different signals about where one word ends and the next begins. Prose relies on spaces, so sentence case and Title Case only need to decide which letters to capitalise. Code removes the spaces, so camelCase, snake_case and kebab-case carry the word boundaries in the punctuation instead. Using the wrong one is rarely a disaster, but it is always visible to the people who read that kind of text all day.
The seven styles this tool implements are UPPERCASE, lowercase, Title Case, Sentence case, camelCase, snake_case and kebab-case. Each has a tradition, a set of edge cases and a specific place it belongs.
The styles at a glance
| Style | Example | Belongs in | Avoid in |
|---|---|---|---|
| UPPERCASE | NET TOTAL | Short labels, table headers, data exports | Body copy, long headlines |
| lowercase | net total | Tags, email addresses, normalised keys | Anything a person reads as a sentence |
| Title Case | Net Total for March | Article titles, book and course names | Buttons, menus, error messages |
| Sentence case | Net total for March | UI labels, help text, body copy | Bibliographies in some styles |
| camelCase | netTotal | JS/Java variables, JSON keys | URLs, file names on Linux |
| snake_case | net_total | Python, Ruby, SQL columns, env vars | URLs people will read |
| kebab-case | net-total | URL slugs, HTML attributes, npm names | Most programming languages |
UPPERCASE: for scanning, not reading
All-caps text is slower to read than mixed case because every word loses its silhouette — the shape cues that let a reader recognise a word before decoding its letters. That is exactly why it works for short labels you scan rather than read: table headers, warning tags, section dividers, three-letter codes. It stops working at about the length of a headline, and it is a poor choice for long strings because it removes the capital-letter cues that mark proper nouns.
Two practical rules. Keep UPPERCASE strings to a handful of words, and add letter-spacing when you set them in type (0.02–0.05em) so they do not crowd. In data work, UPPERCASE is often used to normalise country codes and currency codes before comparison, which is a legitimate use: the case is part of the convention.
lowercase: normalisation, not style
Lowercase exists mostly as a normalisation step. Before you compare two email addresses, two tags or two search terms, lowercasing them removes a class of false differences — Hello@Example.com and hello@example.com are the same mailbox. The same applies to domain names, which are case-insensitive, and to slugs on hosts that treat paths case-insensitively.
Be careful where case is meaningful: file paths on Linux, base64 strings, case-sensitive identifiers, and passwords. Lowercasing a URL path on a case-sensitive server turns a working link into a 404, and lowercasing a base64 payload destroys it.
Title Case: the rules that trip everyone
Title Case capitalises the first letter of every significant word. The argument is always about which words are significant. The common convention, used by most publishing style guides in some form, is to lowercase short articles, coordinating conjunctions and prepositions — a, an, and, as, at, but, by, for, in, nor, of, on, or, the, to — unless they are the first or last word of the title.
The style manuals do not fully agree. Chicago lowercases prepositions of any length ("A Walk Through the Woods" is Chicago-style), while APA capitalises prepositions of four letters or more, which produces "A Walk Through the Woods" as well but disagrees on shorter ones. The Associated Press capitalises all words of four letters or more. Whichever you follow, apply it consistently within a publication: inconsistency is more noticeable than the choice of rule.
Two edge cases matter in software. Acronyms should survive — converting the API docs for JSON should not produce The Api Docs For Json, so a good converter leaves short all-caps tokens alone. And hyphenated compounds are usually capitalised on both halves (State-of-the-Art), which a naive word-splitter will not do.
Sentence case: the default nobody argues about
Sentence case capitalises the first word of a sentence and proper nouns, and nothing else. It is the modern default for interface text — buttons, menu items, field labels, tooltips, dialog titles — because it reads like language rather than like a label, and because it scales: a sentence-case label stays readable when it wraps to three lines, while a Title Case label starts to look like a poem.
The conversion is straightforward but has one trap: abbreviations. A converter that capitalises after every period will turn e.g. this example into E.g. This Example. Real sentence-case conversion needs to know that e.g., i.e. and Dr. do not end sentences. This tool applies the simple rule and is honest about it; for text dense with abbreviations, review the output rather than trusting it.
camelCase and its brother PascalCase
camelCase joins words with no separator and capitalises each word after the first: netTotal, parseDateRange, isUserActive. PascalCase — also called UpperCamelCase — does the same but capitalises the first word too: NetTotal, ParseDateRange. The convention comes from languages where identifiers cannot contain spaces, and it dominates JavaScript, Java, C# and Swift for variables, functions and type names.
The practical difficulty is the reverse direction. Given parseURLValue, is that parse URL Value or parse U R L Value? A converter has to guess from the pattern of capitals. The usual heuristic — a run of capitals followed by a lowercase letter splits before the last capital — resolves HTMLParser as HTML Parser and parseURLValue as parse URL Value. It gets acronyms right most of the time and needs a human eye the rest of the time.
Apostrophes have to go in any code style, because identifiers cannot contain them: don't stop becomes dontStop. That is not a bug in the converter; it is a constraint of the target language.
snake_case and kebab-case
Both replace spaces with a single separator and lowercase everything. snake_case uses the underscore and is the house style of Python (PEP 8 recommends it for functions and variables), Ruby, most SQL schemas and the environment-variable convention MAX_RETRY_COUNT — often uppercased for env vars, which is a hybrid worth knowing about.
kebab-case uses the hyphen and lives where a dash is safe: HTML attributes (data-user-id), CSS class names in utility frameworks (text-center), npm package names, and URL slugs. The last one is the important one. In a URL, a hyphen is read as a word separator by both readers and search engines, while an underscore is often read as a joiner. Converting a page title to a slug with underscores is the single most common case-conversion mistake with SEO consequences.
Conversions that quietly break things
- Lowercasing a URL path. Paths are case-sensitive on most servers.
/Docs/Setupand/docs/setupcan be different pages, and lowercasing the first gives you a 404. - Title-casing a domain or email.
example.combecomesExample.Com, which is invalid in most contexts even though DNS ignores case. - Converting code identifiers wholesale. A file-wide case change will rename a class that other files import. Rename through the language's own refactoring tool, which understands scope.
- Title-casing strings that are data, not prose. Product SKUs, hashtags and user names carry meaning in their case; converting them changes identity, not presentation.
- Losing the Turkish i. In Turkish, uppercase of
iisİ, notI. Locale-blind case conversion mangles Turkish text; this is a rare case where the correct behaviour depends on the language tag.
Which style should you use?
Follow the surrounding context. If you are editing a Python file, use snake_case even if you prefer camelCase; if you are naming a page on a site whose other URLs are hyphenated, use hyphens. Consistency inside a codebase or publication beats any abstract preference, and reviewers notice mixed conventions faster than they notice a suboptimal one.
If there is no surrounding context — a new project, a one-off document — the defaults that cause the fewest problems are: sentence case for anything a person reads as language, Title Case for published titles, kebab-case for URLs, snake_case for Python and SQL, camelCase for JavaScript and JSON keys.
FAQ
What is the difference between Title Case and Capitalised Case?
"Capitalised Case" usually means every word starts with a capital, including the small words — Net Total For March. Title Case conventionally keeps articles, conjunctions and short prepositions lowercase unless they come first or last. Both appear in the wild; Title Case is the more standard label for the rule-based version.
Should JSON keys be camelCase or snake_case?
Either, but pick one for the whole API. camelCase dominates JavaScript ecosystems and snake_case dominates Python and Ruby APIs; both are widely consumed without complaint. The genuine failure mode is mixing them inside one payload, which forces every client to maintain two mappings and makes generated type definitions ugly.
Can I convert case inside HTML without breaking tags?
Not with a plain text converter. A case change applied to markup will uppercase tag names and attribute values too, which breaks some attributes and confuses XHTML parsers. Convert the text nodes only — or convert before you add markup. The same applies to JSON: convert string values individually, never the document as a whole.
Try all seven styles side by side in the TextBench case converter, or read how slugs turn titles into URLs for the kebab-case rules that matter most.
Written by the TextBench team. Last updated November 19, 2026.