Skip to content
Text guide

Text Case Styles Explained: Title Case, Sentence Case, camelCase and More

Title Case or Sentence case for headings? camelCase or snake_case for code? Learn what each case style is for, how acronyms complicate things and what automatic conversion cannot fix for you.

Text Case Styles Explained: Title Case, Sentence Case, camelCase and More

Capital letters do more work than we notice. They mark the start of a sentence, flag a name, make a heading stand out and, in code, tell you whether a word is a variable, a class or a constant. This guide walks through the common case styles, when each one is the right choice and the small rules that a quick conversion often gets wrong.

Writing styles

Sentence case

Only the first word and proper nouns get a capital: "How to train your dog in 10 minutes a day". It reads like normal text, which is why many websites, apps and style guides now use it for headings, buttons and menus. It is also the easiest style to keep consistent across a team.

Title Case

Major words are capitalized: "How to Train Your Dog in 10 Minutes a Day". It is traditional for book and film titles and for many news headlines. The hard part is deciding which words are "major". Most style guides keep short articles, conjunctions and prepositions small (a, an, the, and, but, or, in, of, to, on) unless they are the first or last word. The exact list differs between guides, so pick one and stick to it.

A simple converter that capitalizes every word gives "How To Train Your Dog In 10 Minutes A Day". That is fine for labels and informal titles, but for a formal headline you will want to lower the small words by hand.

UPPERCASE and lowercase

All capitals work for short labels, warnings and acronyms. In longer text they are harder to read, because words lose their distinctive outline, and online they come across as shouting. Lowercase is mostly a clean-up tool, for example after typing with Caps Lock on, or as a first step before applying another style.

Programming styles

Names in code cannot contain spaces, so programmers join the words and mark the boundaries in different ways. Using the phrase "max retry count":

  • camelCase: maxRetryCount. Common for variables and functions in JavaScript, Java and C#.
  • PascalCase: MaxRetryCount. Common for class and type names in many languages, and for public members in C#.
  • snake_case: max_retry_count. Standard for variables and functions in Python and Ruby, and common for database columns.
  • kebab-case: max-retry-count. Used in URLs, CSS class names and file names, where hyphens are safe and readable.
  • CONSTANT_CASE: MAX_RETRY_COUNT. Used for constants and environment variables.

The rule that matters most is consistency within a project. Most languages have a style guide or a linter that enforces one convention, and following it makes code easier for others to read.

Acronyms: the awkward case

What should "parse HTML string" become in camelCase: parseHTMLString or parseHtmlString? You will see both. Treating acronyms as ordinary words, as in parseHtmlString, has a practical advantage: the word boundaries stay clear, and the name converts cleanly to other styles. A naive tool can turn parseHTMLString into parse_h_t_m_l_string. Many style guides therefore recommend writing longer acronyms like ordinary words.

The Case Converter splits parseHTMLString into parse, HTML and String before applying the new style, giving parseHtmlString in camelCase and parse_html_string in snake_case.

A worked example

Here is a message typed with Caps Lock stuck on:

THE MEETING IS MOVED TO FRIDAY. i will send the new agenda. PLEASE REPLY BY NOON!

In sentence case it becomes:

The meeting is moved to friday. I will send the new agenda. Please reply by noon!

Every sentence now starts with a capital and the lone "i" is fixed. But "friday" stays small, because no converter can know that it is a proper noun. The same goes for names, brands and places: "iPhone sales in the USA" becomes "Iphone sales in the usa". Always reread converted text for these.

For code, here is a list of field names, one per line:

  • Max Retry Count becomes maxRetryCount, max_retry_count or MAX_RETRY_COUNT.
  • user's first name becomes usersFirstName or users_first_name, because the apostrophe is dropped.

How to use the Case Converter

Paste or type your text and choose a style from the Convert to list. The result appears instantly next to your original, so you can try several styles without retyping anything. For programming styles, put each name on its own line and the Case Converter handles every line separately. Copy the result with one click. The text is processed in your browser and is not sent anywhere.

Good to know

  • Converting is one-way. Once text is all lowercase, the original capitals are gone. Keep the source until you are happy with the result.
  • Some languages have special rules. Turkish has a dotted and a dotless i, and German ß has its own capital forms. Results for such letters can depend on the language settings of the software.
  • URLs and file names. Some web servers treat Report.pdf and report.pdf as different files. Lowercase kebab-case avoids that confusion.
  • Hashtags and accessibility. Writing hashtags in PascalCase, such as #ThrowbackThursday, helps screen readers read the words separately.

FAQ

Should headings on my website use Title Case or Sentence case?

Either works as long as you are consistent. Sentence case is easier to apply correctly and tends to feel friendlier; Title Case looks more formal. Many modern design systems choose sentence case for interface text.

Is camelCase the same as PascalCase?

They join words the same way. The only difference is the first letter: camelCase starts small (firstName) and PascalCase starts with a capital (FirstName). Some people call PascalCase "upper camel case".

What case should database column names use?

snake_case is the most common choice. Many databases fold unquoted names to a single case, and underscores keep the words readable either way. Whatever you choose, use it for every table.

Why does ALL CAPS feel like shouting?

Capitals have long been used for emphasis, and in online writing that has become a convention for a raised voice. Mixed case is also faster to read, because the shapes of words help you recognize them.

Related tools