# Text Case Converter

Transform text between UPPERCASE, lowercase, Title Case, Sentence case, camelCase, snake_case, and kebab-case instantly.

---

- **Canonical URL:** https://dothecalculation.com/calculators/case-converter
- **Category:** Everyday utilities
- **Publisher:** Do The Calculation (https://dothecalculation.com)
- **Cost:** Free, no account or sign-up required
- **Privacy:** Runs entirely in the browser; inputs are never sent to a server
- **Methodology:** https://dothecalculation.com/methodology

---

## Convert text between all major case styles

Transform any text into UPPERCASE, lowercase, Title Case, Sentence case, camelCase, PascalCase, snake_case, kebab-case, and CONSTANT_CASE instantly.

- 8 case style conversions
- Instant preview output
- Copy-to-clipboard per format

## Why Text Case Conventions Matter

Text case conventions are standards that dictate how words and phrases are capitalized. These conventions serve two purposes: they communicate structure (especially in programming) and ensure consistency in formal writing (especially in publishing and UI copy).

In software development, variable and function naming conventions vary by language: Python uses snake_case (my_variable_name), JavaScript uses camelCase (myVariableName), and constants use SCREAMING_SNAKE_CASE (MAX_VALUE). Using the wrong case is not just a style issue — it is often a syntax error, since most languages are case-sensitive.

In publishing, Title Case (capitalize all significant words) is used for headings and book titles, while Sentence case (capitalize only the first word) is preferred for UI labels and blog content. Knowing when to apply each style is a mark of professional writing quality.

## The Eight Major Case Formats

UPPERCASE: All characters are capital letters. "hello world" becomes "HELLO WORLD". Used for constants, acronyms, and emphasis.

lowercase: All characters are small letters. "Hello World" becomes "hello world". Common in URLs, usernames, and slugs.

Title Case: The first letter of each significant word is capitalized. "the quick brown fox" becomes "The Quick Brown Fox". Standard for headings, titles, and proper names.

Sentence case: Only the first letter of the first word is capitalized. "hello world" becomes "Hello world". Used in UI labels and body copy.

camelCase: No spaces; each word after the first starts with a capital. "hello world" becomes "helloWorld". JavaScript variables and JSON keys.

PascalCase (UpperCamelCase): No spaces; every word starts with a capital. "hello world" becomes "HelloWorld". Used for class names in Java, C#, and JavaScript.

snake_case: Words are separated by underscores, all lowercase. "hello world" becomes "hello_world". Standard in Python, Ruby, and SQL.

kebab-case: Words are separated by hyphens, all lowercase. "hello world" becomes "hello-world". Used in HTML attributes, CSS class names, and URL slugs.

## Practical Use Cases

API Integration: REST APIs often return JSON with camelCase keys, while database columns use snake_case and URL routes use kebab-case. Converting between these styles is a constant task when bridging systems.

SEO and URLs: URL slugs should always be kebab-case (e.g., /best-pizza-recipes). Lowercase URLs prevent duplicate content issues (Google treats /Pizza and /pizza as separate pages).

Content Editing: Quickly toggling between Title Case and Sentence case is helpful when repurposing marketing copy across different formats, such as converting a tweet-length sentence into a page heading.

## How to Use This Case Converter

Type or paste your text into the input box. All nine case styles update instantly below as you type, including a live character and word count.

Click "Copy" on any format card to copy just that version to your clipboard — useful when you need a camelCase variable name in one place and a kebab-case URL slug from the same phrase in another.

## Worked Example: Converting "user Profile Details"

The mixed-case input "user Profile Details" converts to userProfileDetails in camelCase, UserProfileDetails in PascalCase, user_profile_details in snake_case, user-profile-details in kebab-case, and USER_PROFILE_DETAILS in CONSTANT_CASE — confirmed by running the tool's actual tokenizer and case-mapping functions against this input.

The tokenizer splits on spaces, hyphens, underscores, and lowercase-to-uppercase letter boundaries before reassembling each format, which is why it correctly separates "Profile" as its own word even though it starts capitalized in the source text.

## Related Calculators

This converter is part of a Text & Encoding Tools cluster. To count words and characters in your text, use the [Word Counter Calculator](/calculators/word-counter-calculator). For web-safe formatting of the resulting slugs, try the [URL Encoder & Decoder](/calculators/url-encoder-calculator) or the [Anagram & Scramble Word Solver](/calculators/anagram-solver) for other text transformations.

## Frequently asked questions

### What is camelCase?

camelCase is a naming convention where the first word is lowercase and subsequent words start with a capital letter, with no spaces or separators. Example: getUserProfile, parseJsonString.

### What is the difference between camelCase and PascalCase?

In camelCase, the first word is entirely lowercase (myVariable). In PascalCase (also called UpperCamelCase), every word starts with a capital, including the first (MyVariable). PascalCase is used for class names; camelCase for variables and functions.

### What is snake_case?

snake_case uses underscores to separate words with all letters in lowercase. Example: first_name, user_profile_data. It is the standard convention in Python, Ruby, and SQL.

### What is kebab-case?

kebab-case uses hyphens to separate words with all letters in lowercase. Example: user-profile, get-all-items. Used for CSS class names, HTML attributes, and URL slugs.

### What is Title Case?

Title Case capitalizes the first letter of each major word (nouns, verbs, adjectives, adverbs) while keeping minor words (a, an, the, and, but, or) lowercase — unless they are the first or last word.

### What is SCREAMING_SNAKE_CASE?

SCREAMING_SNAKE_CASE (also called CONSTANT_CASE) is snake_case in all capitals. Used for defining constants in most programming languages: MAX_RETRY_COUNT, API_BASE_URL.

### What is Sentence case?

Sentence case capitalizes only the first letter of the first word in a sentence or phrase, and any proper nouns. It is the standard for body text, UI labels, and blog post descriptions.

### Why does URL case matter for SEO?

Search engines treat differently-cased URLs as distinct pages (/Product vs /product), creating duplicate content. Using consistently lowercase kebab-case slugs prevents this and is recommended by Google.

### Can case converters handle mixed input?

Yes. A robust converter first tokenizes the input by splitting on spaces, underscores, hyphens, and camelCase boundaries, then reassembles in the target format. This allows converting between any two formats.

### What is train-case?

Train-Case is a variant of kebab-case where each word is capitalized: Hello-World. It is rarely used in programming but appears in some HTTP header conventions (Content-Type, Accept-Language).

### What programming languages use snake_case?

Python is the primary language that mandates snake_case (per PEP 8). Ruby, Go, PHP, and Rust also commonly use it. Database column names and SQL fields universally favor snake_case.

### What is dot.case?

Dot case separates words with periods in lowercase: system.user.name. It appears in property access notation, configuration file keys (log.level), and package names in some ecosystems (like Java's com.example.app).

## Related concepts

- **Naming convention** — A set of rules for choosing the character sequences used for identifiers in source code and documentation.
- **Tokenization** — The process of splitting a string into meaningful units (tokens) before reformatting.
- **URL slug** — The user-readable part of a URL that identifies a specific page, typically formatted in lowercase kebab-case.

## Related guides

- [Understanding Calculator Formulas: How DTC Turns Inputs into Results](https://dothecalculation.com/blog/site-guides/understanding-calculator-formulas) — Understand how Do The Calculation formulas are presented, what the explanation blocks mean, and how to verify calculator logic before using a result in a real decision.

## Related calculators

- [Base64 Text & File Converter](https://dothecalculation.com/calculators/base64-codec-calculator) — Convert text or files to Base64 encoding and decode Base64 strings back to their original format instantly with a file preview.
- [Binary, Hexadecimal, & ASCII Multi-Base Converter](https://dothecalculation.com/calculators/binary-hex-ascii-calculator) — Convert integers and strings between binary, hexadecimal, ASCII, and decimal formats instantly with this free online conversion tool.
- [HEX, RGB, HSL & CMYK Color Converter](https://dothecalculation.com/calculators/color-converter) — Instantly convert colors between HEX, RGB, HSL, and CMYK formats with a live color swatch preview and interactive HSL sliders.
- [Roman Numerals & Decimal Converter](https://dothecalculation.com/calculators/roman-numerals-calculator) — Convert any integer between 1 and 3,999 to Roman numerals and decode Roman numeral strings back to decimal with step-by-step logic.
- [Binary to Text & ASCII Translator](https://dothecalculation.com/calculators/binary-translator-calculator) — Translate binary code to readable ASCII text and vice versa, with a full bit-grid visualization showing each character encoding.
- [Cron Expression Generator & Descriptor](https://dothecalculation.com/calculators/cron-generator) — Generate cron schedule expressions using interactive dropdowns and translate cron strings into human-readable text instantly and free.

---

_This calculator is for general educational and reference purposes only. Results are estimates and should not be used as the sole basis for critical decisions._

---

_Source: [Do The Calculation](https://dothecalculation.com/calculators/case-converter). Quote freely with attribution and a link to this page._
