GuidesText
Text

Title Case, Sentence Case, camelCase, and snake_case: When to Use Each

A practical style guide to choosing case conventions for prose, headings, filenames, variables, APIs, and database fields.

One phrase displayed in several case conventions with code and prose contexts Changing letter case looks cosmetic, but case conventions often communicate structure. customer_id, customerId, CustomerId, and customer-id may represent the same words while belonging to very different ecosystems.

Sentence case for readable prose

Sentence case capitalizes the beginning of a sentence and proper nouns. It is often the most natural choice for UI labels, documentation headings, and explanatory text because it follows normal reading patterns.

Title case is a style choice, not one algorithm

English title-case rules vary by style guide, especially for short prepositions, articles, and words after punctuation. An automatic converter can provide a starting point, but publication titles may still need editorial review for names, acronyms, and deliberate brand casing.

camelCase and PascalCase in code

camelCase is common for variables and functions in languages and ecosystems such as JavaScript. PascalCase is commonly used for classes, types, or components in many conventions. Follow the project’s established style before applying a global conversion.

snake_case and kebab-case

snake_case is common in Python identifiers, SQL column naming conventions, and data fields in some APIs. kebab-case is common in URLs, CSS class naming, and filenames because hyphens are visually clear. For public URLs, use Slug Generator rather than assuming a simple lowercase conversion handles punctuation and separators correctly.

Acronyms and identifiers need review

Automatic conversion cannot always infer whether api id should become apiId, APIId, or ApiID. Nor should it blindly change case-sensitive values such as hashes, passwords, file paths, or identifiers. Convert human labels and naming candidates, not opaque data.

Batch conversion workflow

Use Case Converter on a copy, scan acronyms and proper nouns, then compare against the original if the change affects many lines. For structured refactors in source code, use language-aware IDE tooling rather than a text-only case conversion.

FAQ

Is kebab-case the same as a URL slug?

Not exactly. A good slug workflow may also remove punctuation, normalize whitespace, transliterate or encode characters, and enforce URL-specific rules.

Can case conversion change program behavior?

Yes. Most programming identifiers and many file systems or protocols are case-sensitive. Do not change source identifiers blindly.

Practical next step

Use Case Converter for controlled text transformations, then apply the naming rules of the destination system.

CODELOPE

Keep experimenting.

Use the free tools alongside the guide when you want to test an idea instead of only reading about it.

Explore free tools →