Title case, sentence case and other text cases
Capitalisation follows rules, but they differ between headlines, sentences and code. This guide explains title case and sentence case, which small words stay lowercase, and the programmer cases such as camelCase and snake_case, with an example of each.
The short version
- Decide the style for the place the text will appear.
- Convert the text to that case.
- Fix names and acronyms by hand, since no converter can recognise them all.
- Proofread the converted text before you publish it.
Skip the arithmetic. The free Case Converter does this for you, shows the formula and the working with your own numbers, and runs in your browser - nothing you type is uploaded. Also useful: Word Counter.
Sentence case
Capitalise only the first word of each sentence and proper nouns, as in normal writing: “How to calculate your GPA”. It reads as friendly and is the standard for many interfaces and for APA article titles. A converter can capitalise sentence starts and the word “I”, but it cannot recognise names like London or Ahmed, so check those.
Title case
Capitalise the main words of a heading. In headline style, short articles, conjunctions and prepositions stay lowercase unless they are the first word, the last word or follow a colon: a, an, the, and, but, or, nor, for, of, on, in, at, to, by, as, if, per, via.
Style guides disagree on details (AP capitalises words of four or more letters, Chicago lowercases all prepositions), so follow the guide your publisher or school uses. The “every word” version is common for product names and buttons.
Which style for which place
- Blog posts and headings: either, but pick one and use it everywhere on the site.
- Button labels and menus: usually sentence case (“Save changes”) or every-word capitals, depending on your design system.
- Email subject lines: sentence case tends to read as more personal.
- Academic citations: APA uses sentence case for article titles, MLA uses title case.
- Social media: whatever matches your brand voice. Avoid long stretches of ALL CAPS, which are harder to read.
Cases used in code and file names
| Case | user first name | Typical use |
|---|---|---|
| camelCase | userFirstName | JavaScript and Java variables |
| PascalCase | UserFirstName | Class and component names |
| snake_case | user_first_name | Python variables, database columns |
| kebab-case | user-first-name | URLs, CSS classes, file names |
| CONSTANT_CASE | USER_FIRST_NAME | Constants, environment variables |
These cases join words without spaces. A converter splits the text at spaces, punctuation and existing capital letters, so userFirstName turns cleanly into user_first_name and back.
URLs and SEO
Lowercase kebab-case is the safest form for web addresses, because servers can treat upper and lower case as different pages. Use hyphens rather than underscores, since search engines treat hyphens as word separators.