The 8 Case Styles — When to Use Each
Text case isn't just about aesthetics. In programming, different naming conventions are enforced by language style guides and linters. In writing, case affects readability and formality. Here's when to use each of the eight styles.
UPPERCASE
All letters capitalized. Used for: acronyms (NASA, HTML, API), headings that need strong visual weight, constants in many programming languages (MAX_RETRIES), warning labels, and keyboard shortcuts displayed in documentation.
When to avoid: long blocks of uppercase text are harder to read. Use sparingly for emphasis.
lowercase
All letters in lower case. Used for: URL paths (example.com/about-us), CSS class names, email addresses, most database identifiers, and filenames on case-sensitive Linux systems. Also used intentionally for stylistic effect in brand names like "iPhone" or informal writing contexts.
Title Case
The first letter of each word is capitalized. Used for: page titles, blog post headlines, book titles, product names, navigation menu items, and proper nouns. Different style guides (APA, Chicago, MLA) have different rules about which words to capitalize in titles — this tool applies simple title case where every word is capitalized, which is appropriate for most everyday use.
Sentence case
Only the first word and proper nouns are capitalized. Used for: body text in articles, email subject lines (increasingly common), social media captions, product descriptions, and UI copy in modern apps. Sentence case feels more natural and conversational compared to Title Case, which is why many tech companies use it for UI labels.
camelCase
The first word is lowercase; subsequent words start with a capital letter. No spaces or separators. Used for: JavaScript and TypeScript variable and function names (getUserById, setIsLoading), Java method names, Swift properties, and JSON keys in many APIs. The name comes from the "humps" created by the capital letters.
snake_case
All lowercase, words separated by underscores. Used for: Python variable and function names (user_id, get_user_by_id), database column names (created_at, first_name), C and Ruby conventions, file names on many Unix systems, and environment variable names. Popular in data science and backend development.
kebab-case
All lowercase, words separated by hyphens. Used for: URL slugs (/blog/how-to-write-better), CSS class names (.card-header), HTML data attributes (data-user-id), npm package names (react-router-dom), and file names for web assets. The "kebab" name comes from the skewer-like hyphens connecting the words.
PascalCase
The first letter of every word is capitalized, with no spaces or separators. Used for: class names in most object-oriented languages (UserProfile, PaymentProcessor), React component names (NavBar, LoginModal), TypeScript interfaces and types, and C# conventions throughout. Also called "UpperCamelCase."
Quick Reference: Naming Conventions by Language
| Language / Context | Variables / Functions | Classes / Types | Constants | Files / Modules |
|---|---|---|---|---|
| JavaScript / TypeScript | camelCase | PascalCase | UPPER_SNAKE | kebab-case |
| Python | snake_case | PascalCase | UPPER_SNAKE | snake_case |
| Java | camelCase | PascalCase | UPPER_SNAKE | PascalCase |
| CSS | kebab-case | BEM or kebab | — | kebab-case |
| SQL / Databases | snake_case | PascalCase | UPPER_SNAKE | snake_case |
| URL slugs | kebab-case | — | — | kebab-case |
Common Case Conversion Use Cases
Converting Copy to Headlines
Writing body copy first, then needing a Title Case version for the headline? Paste the sentence, click Title Case, done. You can also chain — paste a headline in Title Case, click Sentence case to get a more casual email subject line.
Preparing Data for Databases
Column names coming from a spreadsheet are often in "First Name" or "First_Name" format. Use snake_case conversion to standardize them all to first_name before running your SQL migration. Much faster than manually renaming 50 columns.
Cleaning Up Code Identifiers
Converting between codebases written in different conventions — say, a Python backend (snake_case) and a JavaScript frontend (camelCase)? This converter handles the transformation. Paste the Python function name, click camelCase, get the JavaScript equivalent.
SEO and URL Slugs
Blog post titles need to become URL-friendly slugs. "The 10 Best Free SEO Tools in 2026" → the-10-best-free-seo-tools-in-2026. Use kebab-case conversion for instant URL slugs. (For a dedicated slug generator with more control, try our Slug Generator.)
Why Case Consistency Matters
Inconsistent naming conventions create real problems:
- Bug risk: On Linux and macOS, file systems are case-sensitive.
userProfile.jsandUserProfile.jsare different files. Mixing cases causes import failures that are hard to debug. - Linter failures: ESLint, Pylint, and most linters enforce naming conventions by default. Using camelCase where PascalCase is expected causes CI failures.
- Team collaboration: When a codebase has five different naming patterns, it slows down code reviews and onboarding. Consistency makes code readable.
- SEO: URLs are case-sensitive on most servers.
/About-Usand/about-usare different pages. Using lowercase slugs consistently avoids duplicate content issues.