Guides › Text Case Styles Explained: camelCase, snake_case, Title Case and More
Text Case Styles Explained: camelCase, snake_case, Title Case and More
Updated October 2026 · by the ListFerret team
“Case” is how a piece of text is capitalised and joined. In everyday writing it decides how a headline looks; in programming it is a convention that makes names consistent and readable. Here is what each style means and where to use it.
Styles for writing
- UPPER CASE — every letter capitalised. Good for short labels and acronyms; hard to read in long passages, and often read as shouting online.
- lower case — no capitals. Used for stylistic branding and for making data consistent before comparing it.
- Sentence case — only the first word and proper nouns are capitalised, like a normal sentence. Many style guides now prefer it for headings and interface text because it reads naturally.
- Title Case — the main words are capitalised. Small words such as “a”, “of”, “the” and “and” stay lower case unless they start or end the title. Exact rules differ between style guides such as AP, Chicago and MLA, so check the one you follow.
- Capitalize Each Word — every word starts with a capital, with no exceptions. Simple, but not the same as true Title Case.
Styles for code and file names
Names in code cannot contain spaces, so words are joined in a consistent way:
- camelCase — words joined, first word lower case, the rest capitalised:
userAccountId. Common for variables and functions in JavaScript, Java and Swift.
- PascalCase — like camelCase but the first word is capitalised too:
UserAccountId. Common for class and component names.
- snake_case — lower case words joined by underscores:
user_account_id. The standard in Python and Ruby, and common in database column names.
- CONSTANT_CASE — upper case with underscores:
USER_ACCOUNT_ID. Used for constants and environment variables.
- kebab-case — lower case words joined by hyphens:
user-account-id. Common in URLs, CSS class names and file names.
- Train-Case and dot.case — Capitalised-Words-With-Hyphens and words.joined.by.dots. Seen in HTTP header names and configuration keys.
Why consistency matters
Mixing styles makes code harder to read and causes bugs, because many systems treat userId and userid as different names. For web addresses, kebab-case is the safest choice: search engines read hyphens as word separators, while underscores can join words together.
Converting between styles
Changing a long list of names by hand is slow and error-prone. Paste text into the Case Converter and click the style you want. For the developer styles, it works out the words from spaces, punctuation and existing capital letters, so “User Account-ID”, userAccountId and user_account_id all become the same words in the new style. With one name per line, each line is converted on its own.
A few cases to watch
- Acronyms: should it be
userID or userId? Pick one rule for your project and stick to it.
- Numbers: “version2Update” may split differently depending on the tool, so check the result.
- Names and brands: “McDonald” or “iPhone” will not survive an automatic title-case conversion. Fix those by hand afterwards.
More guides