Case Converter

Convert text between camelCase, snake_case, kebab-case and six more styles.

Private by design. Your input never leaves this browser. Conversions run locally on your device.

What this tool handles

  • camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE, dot.case, Title Case, Sentence case, lower and UPPER.
  • Shows every style at once for the first non-empty line, or converts every line when you pick a single style.
  • Each line can be converted separately, so a whole list of identifiers can be pasted in.
  • Existing casing, underscores, hyphens, dots and spaces are all read as word boundaries.

Example

Text

user_first_name

Converted

camelCase      userFirstName
PascalCase     UserFirstName
snake_case     user_first_name
kebab-case     user-first-name
CONSTANT_CASE  USER_FIRST_NAME
dot.case       user.first.name
Title Case     User First Name
Sentence case  User first name
lower case     user first name
UPPER CASE     USER FIRST NAME

When you would use it

  • Renaming a block of API fields — Paste the keys of a response as one column and pick snake_case or camelCase; the list comes back in its original order, with blank lines left where they were.
  • Environment variables from a settings path — CONSTANT_CASE turns database.pool.size or databasePoolSize into DATABASE_POOL_SIZE, which is the spelling a .env file or a container env block needs.
  • Slugs for routes, classes and filenames — kebab-case gives the form a URL segment, a CSS class or a documentation filename wants, from a title or an identifier that was written in any other style.
  • Seeing what a rename will really produce — Showing every style prints all ten results for the first non-empty line, so an awkward case — HTTPStatus arriving as httpStatus — is visible before you apply it across a codebase.

Common questions

How are acronyms handled?

A run of capitals is one word, so HTTPStatus splits into HTTP and Status and parseJSONValue into parse, JSON and Value. CONSTANT_CASE restores them exactly, while camelCase and PascalCase lowercase all but the first letter, which makes a Pascal round trip give HttpStatus rather than HTTPStatus.

Where do digits create a word boundary?

A run of digits is always its own word, so utf8Value gives utf_8_value and order99 gives order_99. camelCase and PascalCase join words without a separator, so utf8Value converts back to itself.

What happens to punctuation and other symbols?

Anything that is neither a letter nor a number is treated as a separator and does not survive: a.b, a-b and a b all produce the same two words, and an ampersand or an emoji is dropped. A line holding nothing else comes out empty.

Does it cope with non-ASCII identifiers?

Yes — word splitting uses Unicode letter and number classes, so čeština and größe are not shredded. Case mapping follows the same rules, which means CONSTANT_CASE writes größe as GRÖSSE and that particular change cannot be undone by converting back.

Related tools

  • Regex Tester — Test a regular expression against text with highlighted matches and capture groups.
  • Diff Checker — Compare two texts or two JSON documents line by line or word by word.

Browse all 25 tools