Uppercase, Lowercase, Title Case and Identifier Case Guide

Text case is not one setting but several conventions, each belonging to a context. Title case is editorial, camelCase and snake_case are code conventions, and kebab-case belongs in URLs. Picking the wrong one is rarely a visual problem and often a functional one.

The editorial pair

Title Case capitalises every word; sentence case capitalises only the first word and proper nouns. Most modern publications use sentence case for headings because it reads faster and handles names and acronyms more gracefully. Genuine editorial title case also leaves short articles and prepositions lowercase, which automated conversion cannot reliably do — it has no way to know that "in" is a preposition here and a verb there.

The code conventions

camelCase joins words with internal capitals and names variables in JavaScript, Java and Swift. PascalCase capitalises the first word too and conventionally names types and classes — in most codebases that initial capital is precisely the signal that says "this is a type". snake_case uses underscores and dominates Python, Ruby and SQL schemas.

Why kebab-case is for URLs and not for code

Hyphens are word separators in a URL and are reliably treated as such by search engines, where underscores are less consistently split. In almost every programming language the hyphen parses as subtraction, so a kebab-case variable name is a syntax error. CSS custom properties and Lisp dialects are the exceptions.

What automated conversion cannot know

Converting to lowercase is mechanical and safe. Converting to title or sentence case requires judgement: proper nouns cannot be restored once lowercased, acronyms lose their capitals, and sentence detection is fooled by abbreviations like "e.g." and "Dr." that end in a full stop. Treat the output as a first pass, not a finished result.

A case where it is not cosmetic

Lowercasing is the standard first step before comparing two strings, because two values differing only in capitalisation are almost always meant to be the same. Database columns, filenames on case-sensitive systems and URL paths all behave differently depending on case, and a mismatch there is a bug rather than a style choice.

Related tools and guides

Last updated September 2026 · Editorial policy · How we verify Unicode claims