jsontoolskit.org
JSON and JSON Schema utilities, in the browser
Say hi →

Convert JSON Key Case

camelCase ↔ snake_case ↔ kebab-case ↔ PascalCase · updated 28 July 2026

Rewrite every key in a JSON document to one naming convention — camelCase, snake_case, kebab-case, PascalCase, CONSTANT_CASE, or plain lower/upper. Works recursively through objects and arrays, and warns you when two different keys would collapse onto the same name.

Paste input to start.

How to convert JSON key case

  1. Paste your JSON. Arrays of objects are handled — every element's keys are converted.
  2. Pick the Target case. The word-splitter understands existing camelCase boundaries, underscores, hyphens, and spaces.
  3. Tick Top level only if nested payloads must keep their original naming — common when a field carries a third-party response verbatim.
  4. Check the status bar for collision warnings before using the output.
  5. Copy or download the result.

Collisions are silent data loss

Case conversion is not always reversible. If a document has both userName and user_name, converting to snake_case maps them onto the same key and one value wins. JSON objects cannot hold duplicate keys, so there is no way to preserve both.

When that happens the status bar turns amber and names the colliding keys. Fix the source, or use Rename keys to handle those keys explicitly before converting the rest.

Where the boundaries fall

Privacy

Nothing is uploaded. The conversion runs in this tab using your own browser's JavaScript engine — no server sees your data, and the page keeps working with the network disconnected.

FAQ

Why would I convert case at all?

Boundary mismatch. Databases and Python favour snake_case, JavaScript and JSON APIs favour camelCase, .NET favours PascalCase. Normalising at the edge is cleaner than sprinkling per-field mappings through your code.

Does it change my values?

Only if you tick Also convert string values, which is off by default. Otherwise values pass through byte-for-byte and only keys change.

Is key order preserved?

Yes, keys are re-emitted in their original order. Use Sort keys if you want them alphabetical.