JSON key case converter
Rename every key in a JSON object to camelCase, snake_case, kebab-case, PascalCase or SCREAMING_SNAKE_CASE.
JSON key case converter
Paste a JSON object or array and this tool renames every key to the naming convention your codebase actually uses. It walks the structure recursively, so a deeply nested object under several levels of properties gets every one of its keys converted, not just the top level. Use it after pulling a payload from an API that uses snake_case into a JavaScript or TypeScript codebase that expects camelCase, or the other way around when you're preparing a request body for a backend written in Python or Ruby.
Pick the target style from camelCase, PascalCase, snake_case, kebab-case or SCREAMING_SNAKE_CASE. By default every key is converted, including keys that belong to objects nested inside arrays — turn off "Convert keys inside arrays" if you only want top-level and directly nested objects touched, leaving array items exactly as they arrived. The exceptions field takes a comma- or newline-separated list of key names — such as an API's own field like _id or __v — that should be left untouched wherever they appear in the structure, no matter how deep.
Renaming two differently-styled keys to the same target name is a real risk once styles are mixed — foo_bar and fooBar both become fooBar in camelCase, and one of them will silently overwrite the other in the result. Turn on "Warn about key collisions" and the tally under the output reports exactly how many collisions happened, so you notice before you ship a payload with a missing field. The tally also shows how many of the total keys were actually renamed, and the output byte size. Choose 2-space, 4-space, tab or minified indentation to match your project's formatting.
Everything runs locally in your browser — the JSON you paste, including any private data it contains, is never uploaded or sent to a server. When you're happy with the result, copy it, download it as a .txt file, or send the output straight into another tool's input to chain a second transformation, such as sorting the renamed keys or flattening the object.