JSON Key Case Converter

Rewrite every object key into one naming convention — camelCase, PascalCase, snake_case, kebab-case or SCREAMING_SNAKE_CASE — while every value stays byte-identical. Runs in your browser; nothing is uploaded.

Try:
Converted JSON

About this tool

JSON Key Case Converter parses your JSON, rewrites every object key into the naming convention you pick — camelCase, PascalCase, snake_case, kebab-case or SCREAMING_SNAKE_CASE — and re-serializes the document. Values are never touched: strings, numbers, booleans and null come out exactly as they went in, and keys keep their original order.

That is the everyday chore when data crosses a language boundary: a Python or Ruby service emits snake_case, a TypeScript frontend wants camelCase, a config schema wants kebab-case, and an environment map wants SCREAMING_SNAKE_CASE. Instead of writing a one-off mapper, paste the payload and switch conventions.

Renaming is recursive by default — every level of nesting, including objects inside arrays. Turn Rename keys at every nesting level off to rename only the outermost object's keys (for a root array, the keys of the objects directly inside it).

Worked example

Input:

{ "user_id": 1, "profile_data": { "first_name": "ada", "home-address": { "zip_code": "94107" } } }

With Target key case = camelCase and Indent = 2, the output is:

{
  "userId": 1,
  "profileData": {
    "firstName": "ada",
    "homeAddress": {
      "zipCode": "94107"
    }
  }
}

Switch the target to snake_case and { "lineItems": [ { "itemId": 1 } ] } becomes { "line_items": [ { "item_id": 1 } ] }. Set Indent to 0 to collapse the result onto one compact line.

How keys are split into words

Each key is split before it is rejoined in the target case:

Options

Limits and edge cases

FAQ

Does it rename keys inside nested objects and arrays?

Yes. With Rename keys at every nesting level on (the default) every object key is rewritten at every depth, including objects that live inside arrays. Array element order and array contents are never reordered — only the keys of the objects inside them change.

How are acronyms like `userID` or `HTTPResponse` handled?

Splitting is acronym-aware. A run of capitals is kept together and broken only before its last capital when a lowercase letter follows, so userIDuser_id, parseJSONBodyparse_json_body, and HTTPResponsehttpResponse in camelCase. A naive splitter would give you user_i_d; this one does not.

What happens to `_id`, `$schema` and `__typename`?

Leading sigils are preserved by default, so MongoDB's _id, JSON Schema's $schema and GraphQL's __typename survive the conversion and only the rest of the name is rewritten — $schema_url becomes $schemaUrl. Uncheck Keep leading _ $ @ sigils if you want them stripped (_idid).

Two of my keys collide after conversion — why did it error?

Because losing data silently is worse than failing. If an object contains both user_name and userName, converting to camelCase would map both onto userName and one value would be overwritten. Instead you get key collision at $.path: "user_name" and "userName" both become "userName" — rename one in the source, or add it to Keys to leave untouched.

Are values or key order modified?

No. Only key names change. Values of every type are re-emitted unchanged, and keys keep their original insertion order — the output diffs cleanly against the input. If you also want keys sorted, run the result through a JSON key sorter afterwards.

Is my data uploaded anywhere?

No. The conversion runs entirely in your browser via WebAssembly — the JSON never leaves your device, so it is safe to paste API payloads that contain real data.

Developer & Automation Access

Run it from the terminal

Same engine as this page, headless — via the gizza CLI:

gizza tool json-key-case-convert '{ "user_id": 1, "profile_data": { "first_name": "ada" } }'

New to the CLI? Get gizza →

Open it by URL

Pre-fill and auto-run this tool with query parameters — the names match the API/CLI:

https://gizza.ai/tools/json-key-case-convert/?json=%7B%20%22user_id%22%3A%201%2C%20%22profile_data%22%3A%20%7B%20%22first_name%22%3A%20%22ada%22%20%7D%20%7D&target_case=camel&recurse=true&preserve_keys=Content-Type%2C%20X-Api-Key&preserve_prefix=true&indent=2

Machine-readable descriptor: tool.json — title + parameters JSON Schema for agents.