Back to Blog
Different text case examples showing uppercase, lowercase, and title case
Text Formatting
case converter
camel case
snake case
kebab case
title case

Case Converter: Every Text Case Explained (With Examples)

From UPPERCASE to sentence case, camelCase to kebab-case — learn when and why to use each text case format. The complete guide for writers and developers.

txt.tools Team 2024-12-07 9 min read

Why Text Case Matters

You might think text case is just about aesthetics, but it's much more than that. The case you choose affects readability, communicates tone, and in programming, determines whether your code works at all.

A case converter transforms text between different capitalization formats. It seems simple, but each format has specific rules, use cases, and exceptions. Mastering text case makes you a better writer and a more effective developer.

The Eight Essential Text Cases

1. UPPERCASE

Every letter is capitalized. Used for acronyms (NASA, ASAP), shouting in text messages, security codes, and license keys. In programming, uppercase is conventional for constants: `MAX_SIZE`, `API_KEY`. Avoid using uppercase for long passages — it reduces reading speed by up to 20%.

2. lowercase

Every letter is small. The default for most digital text, URLs, email addresses, and programming identifiers in some conventions. Lowercase text feels informal and approachable.

3. Title Case

Capitalize the first letter of every major word. Used for book titles, article headlines, movie titles, and song names. The rules vary by style guide:

  • APA style capitalizes major words
  • Chicago style capitalizes all words except articles and prepositions
  • AP style capitalizes only the first word and proper nouns
  • 4. Sentence case

    Capitalize only the first letter of the first word. Used for standard sentences, paragraph text, and most web content. Sentence case is the most readable format for body text.

    5. camelCase

    First word lowercase, subsequent words capitalized, no spaces. Used in programming for variable and function names: `getUserData`, `calculateTotalPrice`. camelCase is the standard in JavaScript, Java, and C#.

    6. PascalCase

    Every word capitalized, no spaces. Used in programming for class names, component names, and type definitions: `UserProfile`, `DatabaseConnection`. PascalCase is standard in C# for class names and in TypeScript for type definitions.

    7. snake_case

    All lowercase, words separated by underscores. Used in programming for variable names (Python, Ruby), database column names, and file names: `user_data`, `total_price`. snake_case is readable and works well in systems where spaces are problematic.

    8. kebab-case

    All lowercase, words separated by hyphens. Used in URLs, CSS class names, HTML attributes, and file names: `my-blog-post`, `primary-button`. kebab-case is Google's recommended format for URL slugs.

    Case Conventions by Programming Language

    | Language | Variables | Functions | Classes | Constants |

    |----------|-----------|-----------|---------|-----------|

    | JavaScript | camelCase | camelCase | PascalCase | UPPER_CASE |
    | Python | snake_case | snake_case | PascalCase | UPPER_CASE |
    | Java | camelCase | camelCase | PascalCase | UPPER_CASE |
    | C# | camelCase | PascalCase | PascalCase | UPPER_CASE |
    | Ruby | snake_case | snake_case | PascalCase | UPPER_CASE |
    | TypeScript | camelCase | camelCase | PascalCase | UPPER_CASE |

    When Case Mistakes Matter

    **In programming:** `getUserData` and `getuserdata` are different in case-sensitive languages. A case mistake causes a ReferenceError that can take minutes to debug.

    **In SEO:** Title case in H1 headings can slightly improve readability signals. But consistency matters more than the specific format.

    **In branding:** Some brands have specific case requirements. "iPhone" not "Iphone," "eBay" not "Ebay," "flickr" not "Flickr."

    **In databases:** Most databases are case-sensitive for string comparisons. "hello" and "Hello" are different values.

    Case Conversion Best Practices

    When converting between cases, watch out for:

  • **Acronyms:** "HTML" converted to title case should stay "HTML," not "Html"
  • **Compound words:** "Email" not "email" in title case
  • **Proper nouns:** "iPhone" should stay "iPhone" in any case
  • **Numbers:** Mixing numbers and letters creates ambiguity — "2FA" keeps its case
  • Conclusion

    Understanding text case is a small skill that pays dividends across writing, programming, and digital communication. The right case improves readability, prevents bugs, and communicates professionalism.

    Convert text between any case format with our free Case Converter at txt.tools. Supports uppercase, lowercase, title case, sentence case, camelCase, PascalCase, snake_case, and kebab-case.

    Advertisement

    Enjoyed this article?

    Check out our free online tools at txt.tools to help you work faster and smarter.