Rename a JSON key (recursive)
Rename a key everywhere it appears in a JSON document, including nested objects and arrays of objects. 100% local processing (WebAssembly).
How it works
When an API changes a field name, or when you need to adapt a JSON payload to the format another system expects, renaming a key by hand in a large nested document is tedious and error-prone. This tool recursively walks the entire JSON — nested objects, arrays of objects — and automatically renames every exact occurrence of the given key, at any depth.
What happens if the key appears several times at different levels?
All occurrences are renamed, regardless of nesting level: an "id" key at the root, in a "user" sub-object and in each element of an "items" array will be renamed everywhere in a single operation.
Is the order of keys in the object preserved?
The exact order is not guaranteed after renaming: the renamed key may end up in a different position in the resulting object. This generally doesn't matter in JSON, where the order of an object's keys is not significant.
100% local processing: renaming runs entirely in your browser via WebAssembly, and your JSON is never sent to a server.