ToolForge AI
Text Tools
Text Tools
Developer Tools
Writing

Case Converter Guide: When to Use UPPERCASE, camelCase, snake_case & More

Complete guide to text case formats. When to use UPPERCASE, lowercase, Title Case, camelCase, PascalCase, snake_case, and kebab-case in writing and programming.

MOMaya Okonkwo
Mar 17, 20266 min read

Text case seems simple until you're debugging why your CSS class doesn't apply, or why your API returns a 404 on a URL that looks right. Here's the definitive guide to every text case format and exactly when to use each.

UPPERCASE

Format: ALL LETTERS CAPITALIZED. Example: THE QUICK BROWN FOX

Use UPPERCASE for:

  • β€’Acronyms and initialisms (HTML, CSS, JSON, API, URL)
  • β€’Constants in most programming languages (MAX_RETRY_COUNT)
  • β€’Error messages in some contexts (OLD UNIX conventions)
  • β€’Headers in legal documents
  • β€’Emphasis in informal writing (use sparingly)

Don't use UPPERCASE for: Entire paragraphs or sentences β€” it reads as shouting and reduces readability.

lowercase

Format: all letters in small case. Example: the quick brown fox

Use lowercase for:

  • β€’Email addresses (user@example.com)
  • β€’URL paths (/blog/image-optimization)
  • β€’Username handles
  • β€’Program/command names in terminals
  • β€’HTML tag names

Don't use lowercase for: Proper nouns, beginnings of sentences, or formal writing.

Title Case

Format: First Letter Of Each Major Word Capitalized. Example: The Quick Brown Fox

Use Title Case for:

  • β€’Blog post titles and article headings
  • β€’Book titles, film titles, song names
  • β€’H1 and H2 headings in marketing content
  • β€’Navigation menu items
  • β€’Names of products and features

Standard rules: Capitalize all words except short articles (a, an, the), prepositions (in, on, at, by), and conjunctions (and, or, but, nor) β€” unless they're the first or last word.

Sentence case

Format: Only the first letter of the sentence and proper nouns capitalized. Example: The quick brown fox jumps over the lazy dog

Use Sentence case for:

  • β€’Normal body text in any language
  • β€’UI labels and button text (modern design trend)
  • β€’Error messages and notifications
  • β€’Email bodies and casual writing

Note: In 2026, most modern apps (Google, Notion, Slack) use sentence case for UI elements rather than Title Case. It reads more naturally.

camelCase

Format: First word lowercase, subsequent words capitalized, no spaces. Example: theQuickBrownFox

Use camelCase for:

  • β€’JavaScript and TypeScript variables, functions
  • β€’JSON keys in most API designs
  • β€’React hook names (useState, useCallback)
  • β€’Java and C# instance variables

Why "camelCase"? The uppercase letters in the middle look like humps on a camel.

PascalCase

Format: All words start with uppercase, no spaces. Example: TheQuickBrownFox

Use PascalCase for:

  • β€’JavaScript/TypeScript class names
  • β€’React component names (UserProfile, NavBar)
  • β€’TypeScript interface and type names
  • β€’Constructor functions
  • β€’C# public methods and properties

Difference from camelCase: PascalCase capitalizes the FIRST letter too. userProfile is camelCase; UserProfile is PascalCase.

snake_case

Format: All lowercase, words joined by underscores. Example: the_quick_brown_fox

Use snake_case for:

  • β€’Python variable and function names (PEP 8 standard)
  • β€’Database column names (user_id, created_at)
  • β€’Ruby variables and symbols
  • β€’File names in Python projects
  • β€’Environment variable names (usually CONSTANT_CASE, but sometimes snake_case for dev vars)

kebab-case

Format: All lowercase, words joined by hyphens. Example: the-quick-brown-fox

Use kebab-case for:

  • β€’CSS class names (.nav-bar, .hero-section)
  • β€’HTML ID attributes
  • β€’URL slugs (/blog/image-optimization-guide)
  • β€’Filename conventions for CSS and HTML files
  • β€’Vue component file names

Note: Hyphens in variable names aren't allowed in most programming languages (would be interpreted as subtraction). Stick to snake_case for code identifiers.

CONSTANT_CASE (SCREAMING_SNAKE_CASE)

Format: All uppercase, words joined by underscores. Example: MAX_RETRY_COUNT

Use CONSTANT_CASE for:

  • β€’Constants in JavaScript/TypeScript (const MAX_SIZE = 100)
  • β€’Environment variables (DATABASE_URL, API_KEY)
  • β€’Java, C, C++ compile-time constants
  • β€’Python module-level constants (PEP 8)

dot.case

Format: All lowercase, words separated by dots. Example: the.quick.brown.fox

Use dot.case for:

  • β€’Configuration file keys (app.database.host)
  • β€’Java package names (com.example.myapp)
  • β€’Some API response keys
  • β€’Log field names in structured logging

Quick Reference Table

ContextConventionExample
JavaScript variablecamelCase`userName`
JavaScript constantCONSTANT_CASE`MAX_SIZE`
React componentPascalCase`UserCard`
CSS classkebab-case`user-card`
URL slugkebab-case`user-profile`
Python variablesnake_case`user_name`
Database columnsnake_case`user_name`
Blog post titleTitle Case`My Blog Post`
Body textSentence case`Normal text.`
Environment varCONSTANT_CASE`API_KEY`

Convert text case instantly β†’

Share this article

MO

Maya Okonkwo

Senior Technical Writer

Maya writes about developer tools, APIs, and web technologies. Former full-stack developer turned technical writer.

Tools Mentioned in This Article

Related Articles