How to Convert Text Between Cases

· 5 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. A browser-based converter handles every common case format instantly.

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
SCREAMING_SNAKE_CASE HELLO_WORLD Constants, env variables
kebab-case hello-world URLs, CSS classes, file names
Train-Case Hello-World HTTP headers (older), rare
dot.case hello.world Object paths, namespaced configs
path/case hello/world File paths, URL segments
COBOL-CASE HELLO-WORLD Legacy COBOL identifiers, rare
Cocoa case helloWorld Apple style guide (same as camelCase)

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.

A brief history of naming conventions in code

Early programming languages had hard limits on identifier length: FORTRAN (1957) allowed 6 characters; ALGOL (1958) allowed limited characters. Programmers had to abbreviate aggressively. There was no need for case conventions because identifiers were too short to have multiple words.

When languages allowed longer identifiers (C 1972, Pascal 1970), separating words became a question. Pascal popularized using capital letters to separate words: MyVariable. C historically used lowercase with underscores: my_variable. The split has persisted: most C-family and Unix languages prefer snake_case (Python, Ruby, Rust by default, PostgreSQL columns), while Java-family and Microsoft languages prefer camelCase (JavaScript, Java, C#, Swift, Kotlin).

PascalCase emerged from Smalltalk (1980s) for class names, then was adopted by C++ (1985), Java (1995), and C# (2000). Today most languages use PascalCase for types/classes and camelCase for instances/functions, regardless of word-separator preference.

kebab-case appeared with the Web: CSS chose hyphens (background-color) and URLs prefer them too. Most modern web languages (HTML, CSS, URL paths, JSON schemas) use kebab-case for identifiers visible to the user.

The newest convention is SCREAMING_SNAKE_CASE for constants and environment variables: a Unix shell legacy that crossed over into most programming languages by the 2000s.

When to use each convention

A practical guide:

Title Case rules

"Title Case" sounds simple but has style-guide complications:

A "simple title case" converter capitalizes every word (which technically only matches no major style guide). Most converters offer "Title Case" as a quick estimate but flag the result for manual review of:

Common pitfalls

Tips

Privacy and confidential text

The case converter runs entirely in your browser. The text you paste, intermediate conversions, and the output all stay on your device. Nothing is uploaded to a server, logged, or shared with anyone.

This matters because the strings you convert are often confidential: variable names from proprietary codebases, internal API endpoints, draft article titles, customer-facing copy under embargo, database column names that reveal product structure. Cloud case converters log every conversion in their request logs and may use them for "improvement" or analytics. A browser-only converter has zero exposure, and works offline once the page is loaded.

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.