You paste a heading from a document written in capitals, or a title that is all lowercase, and need it to look right. Or a teacher says "use title case" and you are not sure whether "with" gets a capital letter. This guide explains the cases, the one rule that differs between style guides, and the cases used in code.
The four text cases
- UPPERCASE. Every letter is a capital. It is hard to read in long text, so it suits short labels and warnings.
- lowercase. No capitals at all. Useful for cleaning text before it is compared or searched.
- Sentence case. The first word of the sentence and proper names are capitalized. Everything else is lowercase.
- Title case. The first word and the main words are capitalized. Small words such as "of" and "the" are lowercase in most styles.
Sentence case or title case?
Both are correct. The choice belongs to the document you are writing for, not to the words themselves. A school assignment, a journal or a company style sheet will say which one to use for headings, and often uses one for headings and the other for the titles in a reference list.
A practical rule when no one has told you: pick one for all headings in the document and keep it. Mixing "Monthly Sales Report" and "Monthly sales report" in the same document looks like a mistake even when each one is allowed.
Why title case has no single rule
Title case sounds like a fixed rule, but style guides disagree about the small words. Two of them, in what they say today:
- APA 7. The APA Style website says to capitalize major words and any word of four letters or more, for example With, Between and From. Only minor words of three letters or fewer are lowercase: articles, short conjunctions and short prepositions. The first word of a title or subtitle and the first word after a colon are always capitalized.
- Chicago. Chicago's own Q&A explains that, since the 12th edition in 1969, articles, coordinating conjunctions and prepositions were lowercase regardless of length. It adds that from the 18th edition prepositions of more than four letters are capitalized.
Other guides, such as AP and MLA, have their own versions, and some use a length rule, others a word-class rule. If your instructor names a guide, use that guide's current page, not a memory of a rule.
A worked example
Take a made-up title in lowercase: the effect of sleep on memory: a study from the lab, and what it means. Three conversions from the Case Converter:
- Sentence case: The effect of sleep on memory: a study from the lab, and what it means
- Title Case (every word): The Effect Of Sleep On Memory: A Study From The Lab, And What It Means
- Title Case (APA 7): The Effect of Sleep on Memory: A Study From the Lab, and What It Means
One difference to watch: plain sentence case does not treat a colon as the start of a new sentence, so a study after the colon stays lowercase in the first line. APA capitalizes the first word after a colon in a title, as the APA result shows. Check what your style guide says about subtitles and edit by hand if needed.
The "every word" version is what many people call title case in everyday writing, and it is the simplest. It is not the form APA or Chicago asks for, because it capitalizes of, on, the and and.
What a converter cannot know
A converter works from the letters, not the meaning. It lowercases first and then capitalizes by position, so it cannot tell a name from an ordinary word. A made-up headline shows the effect. Typed in sentence case as NASA launches the Apple iPhone in New York, it comes back as:
Nasa launches the apple iphone in new york
Always read the result once for these:
- Proper names: people, places, organizations, products.
- Acronyms: NASA, UN, PDF.
- Brand spellings: iPhone, eBay, YouTube.
- The word "I": the sentence-case option capitalizes a stand-alone I and contractions such as I'm.
Cases used in code
Programming cases remove the spaces so that a phrase can be used as a name. The characters that are not letters or digits are dropped.
- camelCase: first word lowercase, each next word capitalized: monthlySalesReport. A common choice for variables and functions in JavaScript.
- PascalCase: every word capitalized: MonthlySalesReport. Common for class and component names.
- snake_case: lowercase words joined by underscores: monthly_sales_report. Python's style guide, PEP 8, uses lowercase with underscores for functions and variables.
- CONSTANT_CASE: uppercase with underscores: MONTHLY_SALES_REPORT. Often used for constants.
- kebab-case: lowercase words joined by hyphens: monthly-sales-report. Common in CSS class names and in web addresses; Google's guidance on URLs recommends hyphens to separate words rather than underscores.
- dot.case: lowercase words joined by dots: monthly.sales.report. Seen in configuration keys.
Each language and team has its own habits, so follow the code around you. A contraction is kept as one word: Don't stop believing becomes dontStopBelieving in camelCase.
Mistakes to avoid
- Capitalizing every word and calling it APA. APA lowercases the short minor words.
- Copying a rule from a different style. A title that is right in Chicago can be wrong in APA, because of words such as with and from.
- Mixing cases in one list of headings. Choose one.
- Trusting the output blindly. Names, acronyms and brand spellings need a human check.
- Using all capitals for long text. It is slower to read.
Short glossary
- Major words: nouns, verbs, adjectives, adverbs and pronouns; in APA also any word of four letters or more.
- Minor words: articles, short conjunctions and short prepositions.
- Proper name: the name of a specific person, place or thing.
- Headline style: Chicago's name for title case.