How to Convert Text Case: camelCase, snake_case, Title Case and More

Published on May 15, 2026

Quick summary

Learn 12 text case styles, when to use camelCase, PascalCase, snake_case, kebab-case and Title Case, and how programming conventions differ by language.

Topic: Image tools

Text case conversion changes the capitalization and word-separation style of a string — for example turning user first name into userFirstName (camelCase) or user_first_name (snake_case). Different programming languages and writing contexts expect different conventions, and using the wrong one breaks code or looks unprofessional. The NeatForge Text Case Converter shows all 12 variants at once in your browser.

Why Case Matters in Code and Writing

In code, case is often semantic: UserName and userName are two different identifiers in many languages, and my-class is a valid CSS class while my class is not. In writing, Title Case signals a headline, Sentence case signals body text, and ALL CAPS signals emphasis or urgency.

Getting case right matters because:

  • Compilers and linters enforce naming conventions.
  • APIs and databases expect specific identifier formats.
  • Headlines and titles follow publishing style guides.

The 12 Case Styles Explained

  • UPPERCASE — every letter capitalized (HELLO WORLD).
  • lowercase — every letter lowercased (hello world).
  • Title Case — capitalizes major words, keeps small words like “a”, “the”, “in” lowercase unless first or last (Hello World and Goodbye).
  • Sentence case — capitalizes only the first letter of the sentence (Hello world and goodbye).
  • Capitalize Each Word — first letter of every word uppercased (Hello World And Goodbye).
  • camelCase — first word lowercase, subsequent words capitalized, no separators (helloWorld).
  • PascalCase — every word capitalized, no separators (HelloWorld).
  • snake_case — words lowercase, separated by underscores (hello_world).
  • kebab-case — words lowercase, separated by hyphens (hello-world).
  • CONSTANT_CASE — words uppercase, separated by underscores (HELLO_WORLD).
  • aLtErNaTiNg — alternating case letter by letter (hElLo WoRlD).
  • InVeRsE — swaps the case of every letter (HELLO WORLDhello world).

For programming cases, all non-alphanumeric characters (spaces, dashes, punctuation) are treated as word separators and removed.

When to Use Each Case

Programming conventions vary by language:

  • JavaScript / TypeScriptcamelCase for variables and functions, PascalCase for classes and React components.
  • Pythonsnake_case for variables and functions, PascalCase for classes.
  • Rust and GoPascalCase for exported/public items, snake_case for private (Rust) or camelCase (Go) for locals.
  • CSS and HTMLkebab-case for class names and custom properties (--primary-color).
  • ConstantsCONSTANT_CASE in JavaScript, Python and many others (MAX_RETRY_COUNT).
  • Writing — Title Case for headlines and book titles, Sentence case for sentences and many blog post titles.

How to Convert Text Case

  1. Open the Text Case Converter.
  2. Type or paste your text into the input box.
  3. All 12 variants appear instantly in a grid below — no button to click.
  4. Click Copy next to the variant you need.

All conversion happens locally in your browser, so your text is never uploaded or stored.

FAQ

What is the difference between Title Case and Capitalize Each Word? Title Case keeps small words like “a”, “the”, “in” lowercase unless they are first or last. Capitalize Each Word uppercases the first letter of every word.

What is CONSTANT_CASE used for? CONSTANT_CASE (uppercase with underscores) names constants in many languages, for example MAX_RETRY_COUNT in JavaScript or Python.

How does camelCase handle punctuation? All non-alphanumeric characters are treated as word separators and removed, so hello world! becomes helloWorld.

→ Open the free Text Case Converter

Advertisement

Explore this topic

Image tools

Read more guides in this cluster and move between related tools faster.

View topic guides

Useful tools

Related Guides