Case Converter
Convert text between 15 case formats — UPPER, lower, Title, camelCase, PascalCase, snake_case, CONSTANT_CASE, kebab-case, Train-Case, dot.case, and more. All cases shown at once.
0 words · 0 chars
UPPERCASE
HELLO WORLD
lowercase
hello world
Sentence case
Hello world.
Title Case
Hello World
camelCase
helloWorld
PascalCase
HelloWorld
snake_case
hello_world
CONSTANT_CASE
HELLO_WORLD
kebab-case
hello-world
Train-Case
Hello-World
dot.case
hello.world
path/case
hello/world
aLtErNaTiNg
HeLlO WoRlD
StUdLy CaPs
hElLo WoRlD
iNVERSE cASE
hELLO wORLD
What is a case converter?
A case converter changes the capitalization style of your text — from UPPERCASE to lowercase to Title Case to camelCase and back. The conversion sounds trivial but writing a correct converter is surprisingly fiddly because real-world input often arrives in the "wrong" case already (e.g. you have helloWorld and want hello_world — a naivetext.toLowerCase() wipes the boundary information you need). This tool tokenizes input properly by detecting word boundaries on lowercase→Uppercase transitions, so it handles input inany existing case correctly. All 15 outputs are shown at once — click any one to copy.
The 15 case formats explained
- UPPERCASE — all letters capitalized. Headings, acronyms, emphasis. Example:
HELLO WORLD. - lowercase — all letters lower. URLs, email addresses, hashtags. Example:
hello world. - Sentence case — first letter of each sentence capitalized. UI text, descriptions. Example:
Hello world. This is text. - Title Case — first letter of major words capitalized (stop-words stay lowercase). Blog titles, headlines. Example:
The Best Way to Learn React. - camelCase — no spaces, first word lowercase, subsequent words capitalized. JavaScript/TypeScript variables and functions. Example:
helloWorld. - PascalCase (UpperCamelCase) — no spaces, every word capitalized. Class names, React components, type names. Example:
HelloWorld. - snake_case — words separated by underscores, all lowercase. Python variables, database columns, Ruby symbols. Example:
hello_world. - CONSTANT_CASE (SCREAMING_SNAKE_CASE) — uppercase snake_case. Environment variables, language constants. Example:
HELLO_WORLD. - kebab-case (dash-case) — words separated by hyphens, all lowercase. URL slugs, CSS class names, HTML attributes. Example:
hello-world. - Train-Case — capitalized words separated by hyphens. HTTP header names (
X-Custom-Header). Example:Hello-World. - dot.case — words separated by dots. Filename segments, namespace paths. Example:
hello.world. - path/case — words separated by slashes. URL paths, file paths. Example:
hello/world. - aLtErNaTiNg cAsE — alternates upper/lower starting with upper. Common meme format. Example:
HeLlO WoRlD. - StUdLy CaPs — alternating, starts with lower. The original SpongeBob meme format. Example:
hElLo WoRlD. - iNVERSE cASE — swaps the case of every letter. Less common but useful for some sarcastic comments. Example:
hELLO wORLD.
When to use each case (style guide cheatsheet)
| Case | Standard in | Reason |
|---|---|---|
| camelCase | JavaScript, TypeScript, Java, Swift, Kotlin variables / functions | Readable inside dot-access expressions |
| PascalCase | React components, C# classes, Type names | Visually distinguishes types from values |
| snake_case | Python variables, Ruby symbols, SQL column names, Rust | Easier to read for compound names with 3+ words |
| CONSTANT_CASE | Env vars, all language constants, #define macros | Signals immutability / global scope |
| kebab-case | URLs, CSS classes, HTML attributes, web fonts, npm package names | Hyphens are URL-safe; spaces aren't |
| Train-Case | HTTP headers (Content-Type, X-Forwarded-For) | RFC 7230 convention |
| dot.case | Java packages, AWS resource ARNs, semver tags | Reflects namespace hierarchy |
| Title Case | Blog post titles, book titles, headlines | AP / Chicago style for English titles |
Why this case converter is better than typical ones
Most online case converters call text.toLowerCase() as a first step, then re-build the output. This is fine when input is plain English ("hello world") but breaks when input is already in another case. Example: paste helloWorld and ask for snake_case. A naive converter does text.toLowerCase() → helloworld first, losing the boundary, and outputs helloworld (wrong). This tool detects boundaries before normalizing, so helloWorld → hello_world works correctly. It handles:
- camelCase / PascalCase input (boundary at lower→upper)
- Acronyms like
HTTPServer→http_server, noth_t_t_p_server - Mixed punctuation:
hello-world.foo_bar→ tokenized correctly - Numbers as word characters:
v2Release→v2_release
Frequently Asked Questions
What is Title Case?
Title case capitalizes the first letter of every major word while keeping minor words (a, an, the, and, or, but, etc.) lowercase. It's the standard format for blog titles, book titles, and article headlines under AP and Chicago style guides. This tool follows a common stop-word list — if you need strict AP or Chicago compliance, double-check edge cases manually.
What's the difference between camelCase and PascalCase?
Both join words without spaces. camelCase starts with a lowercase letter (myVariable), used for variables and functions. PascalCase starts with an uppercase letter (MyComponent), used for classes, React components, and type names. The convention is so universal that JavaScript's style guides (Airbnb, StandardJS, ESLint defaults) all enforce it.
What's the difference between snake_case and CONSTANT_CASE?
CONSTANT_CASE is uppercase snake_case. By convention, lowercase snake_case is used for variables and functions (Python: user_name), while CONSTANT_CASE is reserved for compile-time constants and environment variables (MAX_RETRIES, DATABASE_URL).
What is kebab-case used for?
Kebab-case (also called dash-case or hyphen-case) is the standard for URLs (/blog-posts), CSS class names (btn-primary), HTML attributes (data-user-id), npm package names, and web component tags. It's called kebab-case because the words are skewered on hyphens like meat on a kebab.
Why is dot.case useful?
Dot.case is used in Java/Kotlin package names (com.example.app), file extensions (config.production.json), AWS resource ARNs, and many domain notations. It signals hierarchical namespacing.
Is there a case-insensitive version that preserves the original case?
The "iNVERSE cASE" converter swaps the case of each letter individually — useful for quickly inverting the case of accidentally-capitalized text (Caps Lock disaster).
Does this work on non-English text?
UPPERCASE and lowercase use JavaScript's built-in toUpperCase /toLowerCase, which work for most Latin-script languages with diacritics. Case folding for non-Latin scripts (Greek, Cyrillic, Turkish dotless i) follows JavaScript's defaults. Title Case uses a basic word-boundary regex that may not capitalize compound words correctly in languages like German.