Learn the different text cases and when to use each. Covers UPPERCASE, lowercase, Title Case, Sentence case, camelCase, snake_case, kebab-case, and PascalCase with usage rules.
Text case — the pattern of uppercase and lowercase letters in text — is more than a stylistic choice. In writing, different cases signal different things (titles vs body text vs emphasis). In programming, naming conventions using specific cases are enforced by coding style guides and sometimes by compilers themselves. Knowing which case to use and when is a fundamental skill for both writers and developers.
Every letter is capitalized: HELLO WORLD
Use for: Acronyms (NASA, HTTP, URL), extreme emphasis, headings in some formal documents, constant names in some programming languages
Avoid: Running text — all caps significantly reduces readability and is perceived as shouting in digital communication
Every letter is lowercase: hello world
Use for: Most programming variable names in languages like Python (snake_case), URL slugs, email addresses
Major words are capitalized; minor words are not: "The Quick Brown Fox Jumps Over the Lazy Dog"
Title case rules (Chicago Manual of Style):
Use for: Article headlines, book titles, movie titles, webpage headings, product names
Only the first word and proper nouns are capitalized: "The quick brown fox jumps over the lazy dog"
Use for: Normal prose, email subjects (increasingly), social media posts, app UI labels and buttons (recommended by Google Material Design and Apple HIG for most UI text)
Letters alternate between upper and lower: hElLo WoRlD
Use for: Mocking/sarcasm in informal contexts (the "mocking SpongeBob" meme format); no practical writing use
Programming languages and style guides have strong conventions about which case to use for which type of identifier:
First word lowercase, subsequent words capitalized, no spaces: myVariableName, getUserById
Used in: JavaScript variables and functions, Java variables and methods, Swift, JSON keys
Every word capitalized, no spaces: MyClassName, UserProfile, HttpRequest
Used in: Class names in most object-oriented languages (Java, C#, Python, Swift), React component names, TypeScript interfaces
All lowercase, words separated by underscores: my_variable_name, user_id
Used in: Python variables and functions (PEP 8), Ruby, Rust, SQL column names, C language variables
All uppercase with underscores: MAX_CONNECTIONS, DEFAULT_TIMEOUT
Used in: Constants in Python, C, Java, most languages — the convention for values that don't change
All lowercase, words separated by hyphens: my-variable-name, user-profile
Used in: CSS class names and IDs, HTML attributes, URL slugs, file names for web projects, npm package names
| Case | Example | Primary Use |
|---|---|---|
| camelCase | myVariable | JS/Java variables |
| PascalCase | MyClass | Class names |
| snake_case | my_variable | Python, SQL |
| SCREAMING_SNAKE | MAX_SIZE | Constants |
| kebab-case | my-class | CSS, URLs, HTML |
Different style guides have different title case rules, which is why "The" and prepositions are handled inconsistently across publications:
For blog headlines and web content, Chicago Manual of Style or AP style are most common. For academic papers, use whatever your institution requires.
Use our free Text Case Converter — results appear as you type. No sign-up needed!
🚀 Open Text Case Converter Free