# Case Converter

> Convert an identifier into twelve conventions at once, like camelCase, PascalCase, snake_case, CONSTANT_CASE and kebab-case, with acronyms handled correctly.

Source: https://www.revquix.com/tools/case-converter
Cost: free, no signup

---

One identifier in, twelve conventions out, with the acronym handling most converters get wrong. Paste a whole column list and it converts line by line.

## At a glance

- Takes: One identifier, or a whole list with one per line
- Returns: Twelve conventions at once, each with its own copy button
- Handles: Acronym runs, digit boundaries, and every separator as a word break
- Privacy: Runs in your browser - nothing you paste is uploaded

## The whole tool is the tokeniser

Emitting camelCase once you have the words is three lines. Getting the words out of an identifier like parseHTTPResponse2XML is the part that separates a working converter from one that produces nonsense, and it fails in a specific way: splitting on every lower-to-upper boundary turns that input into nine fragments, one per capital.

The rule that handles acronyms is to split before the last capital of a run that is followed by a lowercase letter, because that capital begins the next word. So parseHTTPResponse becomes three words, and XMLHttpRequest becomes three as well. Digits are their own boundary in both directions, which is what a constant-case output requires and what a naive splitter never produces.

## Twelve conventions, and where each one belongs

Every output carries a note saying where that convention is the norm, because the question is rarely what kebab-case is and often which one this context wants.

- camelCase for JavaScript and Java variables, and for JSON keys
- PascalCase for type names and React components
- snake_case for Python, Ruby and SQL columns
- CONSTANT_CASE for environment variables and compile-time constants
- kebab-case for URLs, CSS classes and npm package names
- Train-Case for HTTP header names, where acronyms are always flattened
- dot.case for Java properties, translation keys and feature flags

## Acronyms are preserved by default

An identifier containing HTTP round-trips through Pascal case with the acronym intact rather than title-cased. Both spellings exist in real code and the flattened one discards information the input carried, so keeping it is the default and flattening is an explicit switch.

The one exception is Train-Case, where flattening is unconditional: HTTP header names are conventionally written with each part capitalised and the acronym flattened, and every framework that generates them emits that form.

## What it will not do

Conversion is lossy in one direction. An underscore-separated name and a camel-cased one produce the same words, so any round trip is stable - but once an acronym has been flattened, the original spelling cannot be recovered.

It does not know your language’s reserved words, so converting class or def gives a valid string that is not a valid identifier. It also drops punctuation rather than transliterating it, which is right for a rename and wrong if the punctuation was meaningful.

## Questions people ask

### Why does an acronym stay as one word instead of splitting per letter?

Because a run of capitals is treated as a single word. The splitter breaks before the last capital of a run that is followed by a lowercase letter, since that capital starts the next word. Splitting on every lower-to-upper boundary instead is the standard bug in converters of this kind, and it turns one identifier into nine fragments.

### Can I convert a whole list at once?

Yes. Paste one identifier per line and each line converts independently, keeping the line structure. That is the shape of the task most people actually bring here - renaming a column list, or turning a block of JSON keys into constants.

### What does flatten acronyms change?

Whether an acronym survives as typed or is title-cased in the styles that capitalise words. It is off by default, because the input carried that distinction and discarding it is a lossy transform you did not ask for. Switched on, it produces the spelling Google’s Java style guide and the .NET naming conventions both prefer.

### Why is Train-Case always flattened?

Because HTTP header names are conventionally written with the acronym title-cased, and every framework that generates them emits that form. Preserving the acronym there would produce the unusual spelling rather than the faithful one, so that single style ignores the switch.

### Does it handle non-English identifiers?

Word splitting is Unicode-aware, so accented letters and non-Latin scripts are treated as letters rather than dropped as punctuation, and case conversion uses the locale-aware operations. If you are naming code in Turkish, check the dotted and dotless i in the output rather than trusting it.
