Skip to content
cosmodev ~/tools/case-converter

Case Converter

Text & String

Convert text between UPPER, lower, Title, Sentence, camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE and slug. Live, one-click copy.

Output
Type or paste text to see it converted.

What it does

Converts one text into ten casing conventions at once: camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE, slug, Title Case, Sentence case, UPPER, and lower. Pick a chip, and the text re-renders in that case. Short single-line results render in large type; long or multiline results render in the output box. The share link carries both the case and the text, so you can send an exact setup.

How to use it

  1. Type or paste text into the input.
  2. Tap one of the ten case chips along the top.
  3. Read the converted result. Short results render large; long or multiline results render in the box.
  4. Copy the result, or copy the share link to reopen the tool with your case and text.

Examples

Input hello world in every case the tool offers:

Case Result
camelCase helloWorld
PascalCase HelloWorld
snake_case hello_world
kebab-case hello-world
CONSTANT_CASE HELLO_WORLD
slug hello-world
Title Case Hello World
Sentence case Hello world
UPPER HELLO WORLD
lower hello world

Slug and kebab-case produce the same string here. The difference is intent: a slug is a URL segment, kebab-case is an identifier convention.

How text cases work

Each convention is one rule for joining words, plus one for capitalizing them:

Convention Join Capitalize Where it lives
camelCase nothing first word lower, rest capped JavaScript and TypeScript variables, functions
PascalCase nothing every word capped classes, React components, TypeScript types
snake_case underscore all lower Python identifiers, SQL column and table names
kebab-case hyphen all lower CSS classes, custom HTML attributes, package names
CONSTANT_CASE underscore all upper environment variables, enum values, config keys
slug hyphen all lower URL path segments - what Slugify produces

The other four (Title, Sentence, UPPER, lower) format prose rather than identifiers: headings, first lines, shouting, normalizing.

How the tool finds the words. It splits input on whitespace, underscores, hyphens, and dots, and it breaks camelCase at lower-to-upper boundaries (helloWorld becomes hello + World). Symbols drop out, so hello, world! and Hello World both convert to the same helloWorld. Paste any mixed input and the ten outputs come from the same word list - only the join and capitalize rules differ.

Why teams pin one case per surface. A codebase that writes user-id, userId, and user_id in three layers makes every boundary a translation bug. The table above is the de-facto map: pick a case per surface once, and conversion becomes mechanical.

Good to know

  • Word-splitting is lossy. Punctuation is dropped, not preserved: hello, world! yields helloWorld, with no comma.
  • Numbers count as letters. version 2 converts to version2 / VERSION_2 like any word.
  • Private: all conversion runs locally in your browser. Nothing is sent anywhere.
  • Related tools: Slugify, Word Counter.
Source code14 languages

100% client-side · your data never leaves your browser. Found this useful? Share it with a teammate.