Text Case Styles: Title Case, Sentence Case, camelCase and More
A reference to the common capitalisation styles in writing and programming, and when to use each one.
Why case matters
Capitalisation affects how professional text looks, how easy it is to scan and, in programming, whether code works at all. Choosing a style and applying it consistently is one of the simplest ways to make writing and code look polished.
Case styles in writing
UPPERCASE
Every letter is a capital. It is good for short labels, acronyms and warnings, such as “STOP” or “FAQ”. Long passages in capitals are slower to read because words lose their distinctive shapes, and in online messages capitals can read as shouting. Convert with the Uppercase Converter.
lowercase
Every letter is small. It is used for email addresses, hashtags, URLs and some brand styles. It is also a useful first step when cleaning data, because it makes comparisons case-insensitive. Use the Lowercase Converter.
Sentence case
Only the first word and proper nouns are capitalised, as in a normal sentence: “How to brew better coffee at home”. Many modern style guides, including those used for user interfaces, prefer sentence case for headings and buttons because it reads naturally and avoids debates about which words to capitalise.
Title Case
Major words are capitalised and minor words are not: “How to Brew Better Coffee at Home”. It is traditional for book titles, newspaper headlines and many blogs. The Title Case Converter applies the common rules automatically.
Title case rules in more detail
All major style guides agree on the basics:
- Capitalise the first and last words.
- Capitalise nouns, pronouns, verbs, adjectives and adverbs, including short ones such as “Is”, “It” and “Be”.
- Lowercase articles (a, an, the) and coordinating conjunctions (and, but, or, nor) in the middle of a title.
They disagree about prepositions. AP style capitalises any word of four letters or more, so it writes “Walking Through the Park”. Chicago style lowercases prepositions regardless of length, giving “Walking through the Park”. Pick the style your publication uses and stay consistent.
Case styles in programming
Programming languages cannot have spaces in names, so developers use capitalisation and separators to mark word boundaries. Each language community has its own conventions.
- camelCase:
userName,getTotalPrice. Used for variables and functions in JavaScript, Java and many other languages. - PascalCase:
UserAccount. Used for classes and types in most languages, and for React components. - snake_case:
user_name. The standard for variables and functions in Python and Ruby, and common in database columns. - CONSTANT_CASE:
MAX_RETRIES. Used for constants and environment variables. - kebab-case:
user-profile. Used in URLs, CSS class names and file names. Search engines read hyphens as word separators, which is why URL slugs use them. Create them with the Slug Generator.
Just for fun: alternating case
“aLtErNaTiNg cAsE” became an internet shorthand for a mocking tone. It is hard to read and unfriendly to screen readers, so keep it to casual chats. The Alternating Case Converter will create it for you.
Accessibility tips
- Avoid long passages in capitals. If you want capitals for visual style on a website, type the text normally and use CSS
text-transform: uppercase, so screen readers still read words normally. - Use capitals at word boundaries in hashtags (
#CoffeeLovers) so screen readers pronounce them correctly. - Be consistent: mixing title case and sentence case in the same menu looks careless.