How to Convert Text Between Cases

· 3 min read

Naming conventions matter. Whether you are writing code, creating file names, or formatting headings, using the right text case keeps things consistent and professional. Converting between cases manually is tedious and error-prone — especially with long text or variable names.

Common text cases and where they are used

Case Example Common use
UPPERCASE HELLO WORLD Constants, acronyms, headings
lowercase hello world CSS properties, email, casual text
Title Case Hello World Headings, titles, proper nouns
Sentence case Hello world Body text, descriptions
camelCase helloWorld JavaScript/Java variables, functions
PascalCase HelloWorld Class names, React components
snake_case hello_world Python, Ruby, database columns
kebab-case hello-world URLs, CSS classes, file names
CONSTANT_CASE HELLO_WORLD Constants, environment variables

How to convert text case

  1. Paste your text — enter any text into the converter. It works with single words, variable names, sentences, or entire paragraphs.
  2. Choose a case — click the format you want. The conversion applies instantly.
  3. Copy the result — click Copy to grab the converted text for your code, document, or file name.

Practical uses

Renaming variables — pasting a snake_case variable name and converting to camelCase (or vice versa) is faster and less error-prone than retyping it.

Formatting headings — converting a paragraph title to Title Case ensures consistent capitalization across your document.

Creating URL slugs — converting a page title to kebab-case gives you a clean, URL-friendly string.

Writing constants — converting a descriptive name to CONSTANT_CASE follows the convention your team expects.

Tips

Frequently Asked Questions

What is the difference between camelCase and PascalCase?

camelCase starts with a lowercase letter and capitalizes each subsequent word (myVariableName). PascalCase capitalizes every word including the first (MyVariableName). In most languages, camelCase is used for variables and functions, PascalCase for classes and types.

When should I use snake_case vs kebab-case?

snake_case uses underscores and is standard in Python, Ruby, and database column names. kebab-case uses hyphens and is common in URLs, CSS class names, and file names. Use whichever your language or context expects.

What is CONSTANT_CASE?

CONSTANT_CASE (also called SCREAMING_SNAKE_CASE) uses all uppercase letters with underscores between words. It is the standard convention for constants, environment variables, and configuration keys in most programming languages.

Is my text sent to a server?

No. All conversions happen in your browser. Your text never leaves your device.