JSON key renamer
This tool renames one key in a JSON document, either everywhere it appears or only in the top-level object. Developers use it to switch naming styles, like first_name to firstName, or to match a field name another system expects.
- Runs in your browser
- Free, no account needed
- Copy or download the result
Result
The short answer
Renaming a JSON key changes the name but not the value, and the same key often appears at several depths. Working on parsed JSON instead of using find and replace means text inside values is never touched. With the scope set to all, every matching key is renamed at every level.
Worked exampleRenaming first_name to firstName in the sample changes 3 keys: the one at the top and one in each of the two team members (Lin and Sam). last_name and role stay as they were.
Example
{"first_name":"Ada","last_name":"Lovelace","team":[{"first_name":"Lin","role":"analyst"},{"first_name":"Sam","role":"editor"}]}{
"firstName": "Ada",
"last_name": "Lovelace",
"team": [
{
"firstName": "Lin",
"role": "analyst"
},
{
"firstName": "Sam",
"role": "editor"
}
]
}How to use the json key renamer
- Paste your JSON into the JSON box.
- Enter the old name in Current key and the replacement in New key.
- Set Where to Everywhere or Top level only.
- The renamed JSON updates as you type. Press Copy result or Download.
How it works
Everywhere renames the key in every object, including objects inside arrays.
Top level only changes just the top-level object, so the JSON must start with an object, not an array.
If an object already has a key with the new name, the tool stops rather than overwriting data.
Key names are matched exactly, including case. Values are never changed.
You get an error if the key is not found, if both names are the same, or if either name is __proto__, prototype or constructor.
Everything runs in your browser. Your input is not uploaded or stored. If you use Copy link, what you entered is placed in the link.
Questions and answers
How do I rename a key in JSON?
Paste the JSON, then type the current and new key names. The result is the same JSON with that key renamed.
Can I rename keys inside arrays of objects?
Yes, with Where set to Everywhere. Every object in every array is checked.
What happens if the new key already exists?
The tool shows an error and changes nothing, so no value is lost. Rename or remove the other key first.
Is my JSON sent anywhere?
No. Renaming happens in your browser, and the input is not transmitted.
Last updated November 1, 2026. Maintained by SnowRock. How our tools work
All 220 SnowRock tools