About this tool
This editor combines a live JSON validator with the tools you need to change data quickly. Search and replace works on the raw text, with optional case matching and regular expressions, so you can rename keys or update values everywhere at once. Sorting orders object keys alphabetically at every level, or sorts arrays of objects by any field such as id or name. Every change can be undone.
Edit JSON online with instant validation
Use this JSON editor to rename keys, update values and clean up API responses or configuration files. The right-hand pane always shows the validated, formatted result, and any syntax error is reported by line and column as you type.
Find and replace examples
Search and replace works on the raw JSON text. Turn on Regex for patterns and capture groups such as $1. Check the status bar after a replace to confirm the JSON is still valid, and use Undo if it is not.
Rename a key find: "userName" replace: "user_name" Change a value find: "status": "old" replace: "status": "new" Prefix IDs (regex) find: "id": (\d+) replace: "id": "ID-$1"
Why sort JSON keys?
Sorting keys alphabetically gives every object a predictable order. That makes two versions of a file easier to compare, keeps version-control diffs small, and makes large objects easier to scan.
To sort a list of records, enter a field name such as id or name and choose Sort arrays by field. Numbers sort numerically and text sorts alphabetically.
How to use it
- Paste your JSON and edit it directly in the input box. The right side always shows the valid, formatted result.
- Type in Find to count matches, step through them with Next and Prev, then use Replace or Replace all. Turn on Regex for patterns and capture groups like $1.
- Use Sort keys for A to Z or Z to A key order, or enter a field name and choose Sort arrays by field. Press Undo to step back.
Frequently asked questions
Does find and replace work on keys and values?
Yes. It searches the raw JSON text, so it matches keys, string values and numbers. Check the status bar afterwards to make sure the JSON is still valid.
How do I rename a key everywhere?
Search for the key including its quotes, for example "userName", and replace it with "user_name" using Replace all.
What does Sort arrays by field do?
Every array of objects is ordered by the field you name, such as id. Numbers sort numerically and text sorts alphabetically. Items without that field keep their position.
Can I undo a replace?
Yes. The Undo button restores the text from before your last replace, sort or fix.