Skip to content
100% local

JSON key case converter

Rename every key in a JSON object to camelCase, snake_case, kebab-case, PascalCase or SCREAMING_SNAKE_CASE.

Input
Output

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.

FAQ

Does it rename keys inside nested objects and arrays?
Yes, by default it recurses into every nested object, including objects inside arrays. Turn off "Convert keys inside arrays" to leave array items as they are.
What happens if two keys end up with the same name after conversion?
The later key overwrites the earlier one in the output, same as any JSON object. Turn on "Warn about key collisions" to see how many happened in the tally before you rely on the result.
Can I keep some keys exactly as they are, like _id?
Yes. List them in the exceptions field, separated by commas or one per line, and they are left untouched at every level of the structure.
What counts as a word boundary inside a key?
Underscores, hyphens, spaces and camelCase/PascalCase capital letters all mark a boundary, so first_name, first-name and firstName all split into the same two words before being rebuilt in the target style.
Is my JSON uploaded anywhere?
No. Key renaming runs entirely in your browser — your JSON, including any private data it contains, never leaves your device.