induwara.lk
induwara.lkText · Developer

Case Converter — UPPERCASE, camelCase, snake_case & more

Paste any text to see all ten common conversions at once — UPPERCASE, lowercase, Title Case, Sentence case, camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE and dot.case. Unicode-aware, idempotent, runs entirely in your browser.

By Induwara AshinsanaUpdated May 11, 2026
Convert case10 conventions, instantly
Runs entirely in your browser. Nothing is uploaded, logged, or stored.
UPPERCASE
All letters capitalised
HELLO WORLD
lowercase
All letters in lowercase
hello world
Title Case
First letter of every word
Hello World
Sentence case
First letter of every sentence
Hello world
camelCase
First word lower, others Capped
helloWorld
PascalCase
Every word Capped, no separator
HelloWorld
snake_case
Lowercase joined by underscore
hello_world
kebab-case
Lowercase joined by hyphen
hello-world
CONSTANT_CASE
UPPERCASE joined by underscore
HELLO_WORLD
dot.case
Lowercase joined by dot
hello.world
tOGGLE cASE
Swap the case of every letter
hELLO wORLD
aLtErNaTiNg
Lower–upper–lower–upper
hElLo WoRlD

Sources: case mapping is ECMA-262 / Unicode TR-21 (JavaScript's built-in toUpperCase / toLowerCase). Word splitting is a three-pass heuristic: acronym-boundary insert, lower/digit-to-upper insert, then split on non-letter runs. Stop-word list for AP title case is the AP Stylebook composition titles rule. Full citations in the Sources section below.

How it works

The converter applies the same three-pass word-splitting heuristic that the change-case library uses, then re-emits the words under the chosen convention. Every step is a pure function — no network call, no state, no dependency beyond the JavaScript engine's built-in Unicode case mappings.

  1. Pass 1 — acronym boundary. A regex matches a run of uppercase letters followed by an uppercase + lowercase pair, and inserts a space between them. So XMLParser becomes XML Parser and the all-caps acronym is preserved as one word.
  2. Pass 2 — lower / digit to upper. A second regex matches a lowercase letter or digit followed by an uppercase letter, and inserts a space. helloWorld becomes hello World and 100USD becomes 100 USD.
  3. Pass 3 — split on non-word. The gapped string is split on any run of characters that is neither a Unicode letter \p{L} nor a digit \p{N}. Spaces, hyphens, underscores, dots, slashes and punctuation all become separators, and the resulting word list is what every naming convention is built on.
  4. Emit. The word list is re-cased per convention:snake_case lowercases each word and joins with _, kebab-case joins with -, CONSTANT_CASE uppercases each word, camelCase capitalises every word except the first.

UPPERCASE and lowercase are direct calls to JavaScript's built-in String.prototype.toUpperCase and toLowerCase, which follow Unicode TR-21 case-mapping rules. That means accented Latin (Café → CAFÉ), Greek (μ → Μ), Cyrillic (ы → Ы) and full-width Latin all round-trip correctly. Non-cased scripts (Sinhala, Tamil, CJK ideographs) pass through unchanged.

Sentence case lowercases the whole input, then re-capitalises the first letter after the start, after any .!? followed by whitespace, and after a newline or em-dash boundary. Title Case is the every-word variant by default; the methodology tile shows what AP-style (with short-word skip list) would produce instead. Every transform satisfies the idempotence invariant f(f(x)) === f(x) on the eight canonical cases — the "verified" badge in the calculator header is computed live from that check.

Worked examples

Mixed-case phrase

"Hello World"

  1. Pass 1: no acronym run found
  2. Pass 2: o→W triggers gap → 'Hello World'
  3. Pass 3: split on space → words = [Hello, World]
  4. camelCase → 'helloWorld'
  5. PascalCase → 'HelloWorld'
  6. snake_case → 'hello_world'
  7. kebab-case → 'hello-world'
  8. CONSTANT → 'HELLO_WORLD'
  9. dot.case → 'hello.world'

Acronym in identifier

"XMLHttpRequest"

  1. Pass 1: L→Ht triggers gap → 'XML HttpRequest'
  2. Pass 2: p→R triggers another gap → 'XML Http Request'
  3. Pass 3: split → words = [XML, Http, Request]
  4. camelCase → 'xmlHttpRequest'
  5. PascalCase → 'XmlHttpRequest'
  6. snake_case → 'xml_http_request'
  7. CONSTANT → 'XML_HTTP_REQUEST'
  8. Round-trip: snake → camel → 'xmlHttpRequest' (idempotent)

Identifier with digits

"iPhone 12 Pro Max"

  1. Pass 1: no match
  2. Pass 2: i→P fires → 'i Phone 12 Pro Max'
  3. Pass 3: split on space → words = [i, Phone, 12, Pro, Max]
  4. camelCase → 'iPhone12ProMax'
  5. snake_case → 'i_phone_12_pro_max'
  6. kebab-case → 'i-phone-12-pro-max'
  7. PascalCase → 'IPhone12ProMax'

Unicode passes through

"café au lait"

  1. Passes 1 & 2 do not fire (no ASCII upper)
  2. Pass 3: split on spaces → words = [café, au, lait]
  3. UPPERCASE → 'CAFÉ AU LAIT' (Unicode TR-21 mapping)
  4. PascalCase → 'CaféAuLait'
  5. snake_case → 'café_au_lait'
  6. JavaScript's toUpperCase / toLowerCase handle this directly

Frequently asked questions

Sources & references

The transforms on this page were last cross-checked on 2026-05-11. The page is reviewed whenever a naming convention shifts in a major language ecosystem or a relevant TC39 proposal lands. If you spot an edge case that disagrees with another converter, please email me below.

Related tools

Rate this tool
Be the first to rate

Comments & feedback

Spotted a bug or want an improvement? Tell us — our team reviews every comment, and good ideas get built. Comments are public and anonymous.

Spotted a conversion mismatch, an edge case, or want to suggest a new case?

Email me at [email protected] — most fixes ship within 24 hours.