Ready to rename
Paste JSON, set rules, and click Rename Keys// rename json keys in bulk โ values stay untouched
Apply find-and-replace or mapping rules to rename JSON keys in bulk without changing values. Free, browser-based, no sign-up required.
Ready to rename
Paste JSON, set rules, and click Rename KeysDrop any valid JSON object or array into the input field โ supports deeply nested structures.
Use Find & Replace to rename keys by pattern, or Key Mapping to specify exact old โ new names.
Instantly get your renamed JSON. Values are never touched โ only key names change.
JSON Key Renamer lets you apply bulk find-and-replace or explicit key mapping rules to any JSON structure. Unlike manual editing, this tool traverses the entire object graph and renames every matching key โ even deep inside nested arrays and objects โ without ever touching the values.
Find & Replace performs a substring match on every key name and replaces the matched portion. This is useful for renaming prefixes, suffixes, or common patterns across many keys at once. Key Mapping matches only exact key names and maps them to a specific new name, giving you precise control over individual keys.
Never. This tool only renames keys โ all values (strings, numbers, booleans, arrays, nested objects) remain exactly as they were in the original JSON.
Yes. When the Rename nested keys (deep) toggle is enabled, the tool recursively traverses every nested object and array, renaming matching keys at all levels. Disable the toggle if you only want to rename top-level keys.
Yes. Click + Add Rule (or + Add Mapping) to insert as many rules as you need. Rules are applied in order from top to bottom. In Find & Replace mode, all rules are applied to each key sequentially, allowing chained transformations.
No. All processing happens in your browser via JavaScript. Your JSON data never leaves your device. The PHP backend is only invoked optionally โ it performs the same client-side logic on the server but no data is stored or logged.
If two different keys in the same object both rename to the same new key, the last one will overwrite the earlier one โ this mirrors standard JavaScript/PHP object behaviour. Always review the output to ensure no key collisions occur when using broad find-and-replace patterns.
A JSON Key Renamer is a developer utility that applies transformation rules to the keys of a JSON object while leaving all values completely intact. Whether you're migrating an API integration to a new schema, normalizing inconsistent key naming conventions across multiple data sources, or refactoring a large dataset before importing it into a database, a key renamer saves you from tedious manual editing and the risk of accidental value modification.
This tool supports two powerful modes: Find & Replace and Key Mapping. Find & Replace scans every key name for a substring match and substitutes it โ perfect for removing prefixes, converting separators, or applying global naming conventions. Key Mapping provides explicit old-to-new name pairs, giving you surgical control over specific keys without affecting anything else.
๐ก Looking for premium JavaScript plugins and scripts? MonsterONE offers unlimited downloads of templates, UI kits, and developer assets โ worth checking out.
Find & Replace mode treats each key name as a string and performs a literal substring substitution. For example, to convert snake_case to camelCase prefixes, you might replace user_ with an empty string to strip a common prefix from all user-related fields. Multiple rules can be stacked โ they are applied sequentially to each key, allowing you to chain transformations:
data_ โ "" to strip a prefix_id โ Id to convert suffix conventioncamel โ snake for any substring occurrenceThis mode shines when you have consistent naming patterns spread across dozens or hundreds of keys and need them all updated in a single pass.
Key Mapping mode matches key names exactly and replaces them only when a perfect match is found. This is the right choice when:
For instance, mapping firstName โ first_name and lastName โ last_name will only affect those exact keys. A key like firstNameAlias would not be touched.
Modern JSON data structures are rarely flat. API responses often contain nested objects โ user profiles with address sub-objects, orders containing line items containing product details, and so on. The deep rename option recursively traverses every level of your JSON tree, applying your rules to keys at all nesting depths. This means a single rule can rename user_id to userId whether it appears at the root level, inside an array of users, or nested three levels deep inside a profile object.
When you need to rename only top-level keys โ for example, when restructuring the shape of an API wrapper without touching inner data payloads โ simply disable the deep toggle.
Many backend APIs return data in snake_case format (first_name, created_at) while JavaScript conventions favour camelCase (firstName, createdAt). Rather than transforming every key manually or writing a custom recursive function, you can paste your response payload, add individual mapping rules, and get a camelCase-ready output in seconds.
Database exports and ORM serializations often include table-name prefixes in key names โ product_name, product_sku, product_price. Find & Replace mode lets you strip the product_ prefix from all keys at once, producing a cleaner name, sku, price structure.
When a REST API bumps from v1 to v2 and renames several fields, you may need to quickly adapt stored fixtures, mock data, or test payloads to match the new contract. Key Mapping mode lets you specify the exact set of changed fields from the API changelog and transform your data in one click.
Before importing JSON data into MongoDB, PostgreSQL's jsonb columns, or Elasticsearch, key names often need to conform to schema requirements โ no spaces, no hyphens, consistent casing. This tool lets you clean up key names without writing a throwaway migration script.
The renaming algorithm works by recursively walking the JSON object graph. For each node encountered:
This means the algorithm runs in O(n) time relative to the total number of nodes in your JSON tree โ fast enough to handle large payloads entirely in the browser without any server round-trip.
All processing happens in your browser using JavaScript. Your JSON data never leaves your device โ there are no uploads, no server logs, and no storage of your data. This makes the tool safe to use with confidential API payloads, internal data schemas, or production database exports that you wouldn't want passing through a third-party server.
a will match any key containing the letter "a". Prefer longer, more specific patterns to avoid unintended renames.