Why Case Conventions Exist
Text case isn’t arbitrary. It carries information:
- It tells readers and systems whether something is a proper noun, a variable, a function, a constant, or a URL slug
- Different programming languages enforce different conventions (Python: snake_case, Java: camelCase, CSS: kebab-case)
- Humans parse title-cased headings faster than all-caps ones at normal reading sizes
The Main Case Types
Sentence case
The quick brown fox jumps over the lazy dog.
Only the first word and proper nouns are capitalized. This is normal English prose. Most UI labels, app notifications, and informal writing use sentence case.
Used in: Body text, UI labels, email subjects, error messages, tooltips.
Title Case
The Quick Brown Fox Jumps Over the Lazy Dog
The first letter of each major word is capitalized. “Minor” words (prepositions, articles, conjunctions) are typically lowercase in the middle of a title.
Different style guides disagree on which words to lowercase:
- AP Style: lowercase articles (a, an, the), coordinating conjunctions (and, but, or), and prepositions under 4 letters
- Chicago Style: lowercase most prepositions regardless of length, plus articles and coordinating conjunctions
- APA Style: capitalize all words of 4+ letters, even prepositions
Used in: Book titles, article headings, newspaper headlines, product names, film titles.
ALL CAPS (Uppercase)
THE QUICK BROWN FOX
All letters capitalized. Harder to read in long runs — all-caps words lose their shape, forcing letter-by-letter reading.
Used in: Abbreviations (NASA, HTTP, URL), acronyms, button labels for emphasis, legal documents, constants in some languages.
lowercase (all)
the quick brown fox
All lowercase, no exceptions.
Used in: URLs, email addresses, some brand names (e.g. adidas, reddit), CSS class names in some conventions.
camelCase
theQuickBrownFox
No spaces. The first word is all lowercase; each subsequent word starts with a capital letter. The capital letters in the middle resemble camel humps — hence the name.
Used in: JavaScript variables and functions, Java, Swift, Kotlin variable names.
PascalCase (UpperCamelCase)
TheQuickBrownFox
Same as camelCase but the very first letter is also capitalized.
Used in: Class names in most OOP languages (Python, Java, C#), React component names, TypeScript interfaces.
snake_case
the_quick_brown_fox
Words separated by underscores, all lowercase.
Used in: Python variables and functions, database column names, Ruby, file names in some conventions.
SCREAMING_SNAKE_CASE (UPPER_SNAKE_CASE)
THE_QUICK_BROWN_FOX
Like snake_case but all uppercase.
Used in: Constants and environment variables across many languages.
kebab-case (spinal-case)
the-quick-brown-fox
Words separated by hyphens, all lowercase. Named because it looks like items on a kebab skewer.
Used in: URLs (/learn/text-tools/text-case-types-explained), CSS class names, HTML attributes, npm package names, file names for web assets.
// JavaScript convention
const userFirstName = "Mahesh";
function calculateTotalPrice() { ... } Quick Comparison Table
| Case Type | Example | Spaces | Caps | Common Use |
|---|---|---|---|---|
| Sentence case | Hello world | Yes | First word | Body text, UI |
| Title Case | Hello World | Yes | Most words | Headings, titles |
| ALL CAPS | HELLO WORLD | Yes | All | Acronyms, emphasis |
| camelCase | helloWorld | No | After first | JS variables |
| PascalCase | HelloWorld | No | Every word | Classes, components |
| snake_case | hello_world | _ | None | Python, databases |
| UPPER_SNAKE | HELLO_WORLD | _ | All | Constants, env vars |
| kebab-case | hello-world | - | None | URLs, CSS, HTML |
Converting Between Cases
Converting manually is error-prone for long strings. A case converter handles:
1. Split into words
Split on spaces, underscores, hyphens, and capital-letter boundaries (for camelCase/PascalCase input).
2. Apply casing rule
For each word: capitalize first letter (TitleCase/PascalCase), lowercase all (snake/kebab), or uppercase all (UPPER_SNAKE).
3. Join with separator
Join words with space (Title Case), underscore (snake_case), hyphen (kebab-case), or nothing (camelCase/PascalCase).
Use our Case Converter to instantly transform any text into title case, sentence case, camelCase, PascalCase, snake_case, UPPER_SNAKE_CASE, or kebab-case — paste in and convert in one click.