DevLab
T
Text⭐ Popularbeginner

Case Converter

convert text between camelCase, snake_case, kebab-case, and more

By Bikram NathLast updated

Paste any text and get all eight case formats at once: camelCase, PascalCase, snake_case, kebab-case, UPPER_CASE, lowercase, Title Case, and Sentence case, without running separate conversions. Useful when mapping a database column like `user_profile_image` to both a TypeScript property (`userProfileImage`) and a display label (`User Profile Image`) in one step. The all-at-once display is what separates this from single-format transformers.

Try it now — free, instant, no signup

What is Case Converter?

Case Converter takes a text input and renders eight casing variants in parallel so you can copy whichever format your context requires. Feed it `background_color_hex` and you instantly see `backgroundColor`, `BackgroundColorHex`, `background-color-hex`, `BACKGROUND_COLOR_HEX`, and the rest without toggling between tools.

Single-format online converters like RapidTables require a separate page visit per output format. If you are already in a terminal, a sed one-liner or vim's `guW` motion can flip a single identifier, but neither gives you five formats at once for quick comparison. The parallel output here is the practical difference.

The trickiest input for any case converter is already-cased text with consecutive uppercase letters: `XMLParser`, `getUserID`, `HTMLElement`. Word-boundary detection at uppercase runs varies by implementation. Some tools treat `XML` as one token, producing `xml-parser`; others split every capital, producing `x-m-l-parser`. Check the output when your source identifiers include acronyms before mass-replacing across a codebase.

When to use Case Converter

Paste a snake_case database column name to generate both a camelCase TypeScript field and a Title Case display label in one copy step.
Verify how a proposed identifier reads across REST (kebab-case), GraphQL (camelCase), and SQL (snake_case) conventions before committing to a name.
Convert a set of UPPER_CASE environment variable names to kebab-case when writing a docker-compose service configuration.

Frequently Asked Questions

How does the tool detect word boundaries when the input is already camelCase or PascalCase?
The converter splits on transitions from a lowercase letter to an uppercase letter, so `userProfileImage` yields the tokens `user`, `profile`, `image`. It also handles transitions from a run of uppercase letters back to lowercase, so `HTMLParser` is typically tokenized as `HTML` plus `Parser`. The exact boundary algorithm matters if your identifiers mix acronyms with regular words. Paste a sample first and confirm the output matches your intent before using the result to rename files or variables at scale.
What happens to consecutive uppercase sequences like 'getUserID' or 'XMLHttpRequest'?
Consecutive uppercase runs are the known hard case in any casing library. A heuristic approach treats `ID` and `XML` as single tokens; a strict character-by-character approach splits every capital into its own word. The output you see will tell you which strategy is in use. If the result looks wrong for an acronym-heavy identifier, manually space the input (`get User ID` or `XML Http Request`) so the tokenizer has unambiguous boundaries to work from before converting.
Does converting a phrase with punctuation, like 'Hello, world!', produce a valid kebab-case slug?
Punctuation handling varies. Commas, exclamation marks, and apostrophes are usually stripped before conversion, so `Hello, world!` would produce `hello-world` in kebab-case. However, if you need a URL-safe slug specifically, with diacritics stripped, repeated hyphens collapsed, and a max-length enforced, use the slug-generator tool on this site instead. It is built for that exact output contract rather than general identifier conversion, and the two tools have meaningfully different behavior on edge-case input.
What is the practical difference between the Title Case and Sentence case outputs?
Title Case capitalizes the first letter of every word: `User Profile Image`. Sentence case capitalizes only the first letter of the entire string: `User profile image`. In UI work, Title Case is conventional for button labels, nav items, and headings; Sentence case is preferred for body copy, tooltips, and form labels in most modern design systems. Both outputs appear side by side here, so you can pick the one that matches your product's writing guidelines without a separate lookup or manual edit.
How does UPPER_CASE output differ from just uppercasing the whole string?
UPPER_CASE, also called SCREAMING_SNAKE_CASE, is snake_case with every character uppercased: `USER_PROFILE_IMAGE`. Plain uppercase without underscores gives `USERPROFILEIMAGE`, a single unreadable token. UPPER_CASE is the conventional format for environment variable names, compile-time constants in C and Java, and Redux action type strings. If your target is a `.env` file or a constants object, UPPER_CASE is the output you want. The distinction matters because some linters and language style guides treat the two as separate identifier categories with different rules.

Related Tools