Disclosure: Some links are affiliate links — we may earn a commission if you upgrade to a paid tool, at no cost to you. All tools on this site are free to use. See full disclosure →

The 8 Case Styles — When to Use Each

Text case isn't just about aesthetics. In programming, different naming conventions are enforced by language style guides and linters. In writing, case affects readability and formality. Here's when to use each of the eight styles.

UPPERCASE

All letters capitalized. Used for: acronyms (NASA, HTML, API), headings that need strong visual weight, constants in many programming languages (MAX_RETRIES), warning labels, and keyboard shortcuts displayed in documentation.

When to avoid: long blocks of uppercase text are harder to read. Use sparingly for emphasis.

lowercase

All letters in lower case. Used for: URL paths (example.com/about-us), CSS class names, email addresses, most database identifiers, and filenames on case-sensitive Linux systems. Also used intentionally for stylistic effect in brand names like "iPhone" or informal writing contexts.

Title Case

The first letter of each word is capitalized. Used for: page titles, blog post headlines, book titles, product names, navigation menu items, and proper nouns. Different style guides (APA, Chicago, MLA) have different rules about which words to capitalize in titles — this tool applies simple title case where every word is capitalized, which is appropriate for most everyday use.

Sentence case

Only the first word and proper nouns are capitalized. Used for: body text in articles, email subject lines (increasingly common), social media captions, product descriptions, and UI copy in modern apps. Sentence case feels more natural and conversational compared to Title Case, which is why many tech companies use it for UI labels.

camelCase

The first word is lowercase; subsequent words start with a capital letter. No spaces or separators. Used for: JavaScript and TypeScript variable and function names (getUserById, setIsLoading), Java method names, Swift properties, and JSON keys in many APIs. The name comes from the "humps" created by the capital letters.

snake_case

All lowercase, words separated by underscores. Used for: Python variable and function names (user_id, get_user_by_id), database column names (created_at, first_name), C and Ruby conventions, file names on many Unix systems, and environment variable names. Popular in data science and backend development.

kebab-case

All lowercase, words separated by hyphens. Used for: URL slugs (/blog/how-to-write-better), CSS class names (.card-header), HTML data attributes (data-user-id), npm package names (react-router-dom), and file names for web assets. The "kebab" name comes from the skewer-like hyphens connecting the words.

PascalCase

The first letter of every word is capitalized, with no spaces or separators. Used for: class names in most object-oriented languages (UserProfile, PaymentProcessor), React component names (NavBar, LoginModal), TypeScript interfaces and types, and C# conventions throughout. Also called "UpperCamelCase."

Quick Reference: Naming Conventions by Language

Language / Context Variables / Functions Classes / Types Constants Files / Modules
JavaScript / TypeScriptcamelCasePascalCaseUPPER_SNAKEkebab-case
Pythonsnake_casePascalCaseUPPER_SNAKEsnake_case
JavacamelCasePascalCaseUPPER_SNAKEPascalCase
CSSkebab-caseBEM or kebabkebab-case
SQL / Databasessnake_casePascalCaseUPPER_SNAKEsnake_case
URL slugskebab-casekebab-case

Common Case Conversion Use Cases

Converting Copy to Headlines

Writing body copy first, then needing a Title Case version for the headline? Paste the sentence, click Title Case, done. You can also chain — paste a headline in Title Case, click Sentence case to get a more casual email subject line.

Preparing Data for Databases

Column names coming from a spreadsheet are often in "First Name" or "First_Name" format. Use snake_case conversion to standardize them all to first_name before running your SQL migration. Much faster than manually renaming 50 columns.

Cleaning Up Code Identifiers

Converting between codebases written in different conventions — say, a Python backend (snake_case) and a JavaScript frontend (camelCase)? This converter handles the transformation. Paste the Python function name, click camelCase, get the JavaScript equivalent.

SEO and URL Slugs

Blog post titles need to become URL-friendly slugs. "The 10 Best Free SEO Tools in 2026" → the-10-best-free-seo-tools-in-2026. Use kebab-case conversion for instant URL slugs. (For a dedicated slug generator with more control, try our Slug Generator.)

Why Case Consistency Matters

Inconsistent naming conventions create real problems:

  • Bug risk: On Linux and macOS, file systems are case-sensitive. userProfile.js and UserProfile.js are different files. Mixing cases causes import failures that are hard to debug.
  • Linter failures: ESLint, Pylint, and most linters enforce naming conventions by default. Using camelCase where PascalCase is expected causes CI failures.
  • Team collaboration: When a codebase has five different naming patterns, it slows down code reviews and onboarding. Consistency makes code readable.
  • SEO: URLs are case-sensitive on most servers. /About-Us and /about-us are different pages. Using lowercase slugs consistently avoids duplicate content issues.

FAQ

Frequently Asked Questions

What is camelCase and when is it used?

camelCase joins multiple words without spaces, capitalizing the first letter of each word after the first — for example, 'myVariableName'. It is the standard naming convention in JavaScript, Java, Swift, and many other programming languages for variable and function names. The first word starts lowercase; subsequent words start uppercase. 'getUserById' is camelCase; 'GetUserById' is PascalCase.

What is the difference between snake_case and kebab-case?

Both use lowercase words separated by a delimiter, but snake_case uses an underscore (_) while kebab-case uses a hyphen (-). Snake_case is common in Python variable names, database column names, and file names in some conventions. Kebab-case is common in URLs, CSS class names, and HTML attributes. Example: 'background_color' (snake_case) vs 'background-color' (kebab-case, used in CSS).

What is Title Case?

Title Case capitalizes the first letter of every word — for example, 'The Quick Brown Fox'. This tool applies simple title case (every word capitalized). Note that formal title case rules (Chicago, APA, AP style) treat short words like 'a', 'an', 'the', 'and', 'but', 'or' differently depending on position. For headlines, this simple converter is usually sufficient.

What is Sentence case?

Sentence case capitalizes only the first letter of the first word and the first letter after a sentence-ending punctuation mark (period, exclamation mark, or question mark). All other letters are lowercase. Example: 'the quick brown fox.' becomes 'The quick brown fox.' It mirrors how sentences are written in standard prose.

Can I chain conversions — e.g., convert to snake_case first, then to UPPERCASE?

Yes. After converting your text, click 'Use as Input' to copy the output back to the input field, then click another case button. This lets you chain transformations. For example, convert to snake_case first, then to UPPERCASE to get 'MY_VARIABLE_NAME' — a common constant naming pattern in many languages.

More Free Writing Tools

Slug Generator Lorem Ipsum Generator Word Counter

Looking for AI writing tools? Browse our picks for the best AI-powered writers and editors in 2026.

The TextTools Team
Infinfy Editorial
We're a team of writers and editors who built the tools we wished existed. Free, fast, and honest — no upsells, no accounts, no nonsense. Part of Infinfy Solutions.