Online JSON Editor with Find and Replace

Edit JSON online with live validation, find and replace (including regex), key sorting and undo. Everything runs in your browser.

JSON input

1

Result

Waiting for input

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

  1. Paste your JSON and edit it directly in the input box. The right side always shows the valid, formatted result.
  2. 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.
  3. 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.

More JSON tools

JSON Checker – Validate JSON OnlinePaste your JSON into this free JSON checker to validate it instantly. Any error is pinpointed by line and column, so you can fix it in seconds.JSON Formatter and BeautifierFormat and pretty print JSON online. Turn minified or messy JSON into readable, indented, syntax-highlighted text with 2 spaces, 4 spaces or tabs.JSON Minifier – Compress JSON OnlineMinify JSON online by removing every unnecessary space and line break. See the size before and after, then copy or download the result.JSON to CSV ConverterConvert JSON to CSV online. Paste an array of JSON objects and get a CSV ready for Excel, Google Sheets or a database, with nested objects flattened into columns.CSV to JSON ConverterConvert CSV to JSON online. The first row becomes the keys, and each following row becomes a JSON object. Dotted headers are rebuilt into nested objects.JSON to YAML ConverterConvert JSON to YAML online for Kubernetes manifests, Docker Compose files, CI pipelines and other configuration. Paste valid JSON and copy the YAML.YAML to JSON ConverterConvert YAML to JSON online. Paste YAML from a config file and get valid, formatted JSON, with syntax errors explained.JSON Diff Checker – Compare JSON OnlineCompare two JSON documents online and see exactly what was added, removed or changed, listed by path. Click any difference to jump to it.JSON Tree Viewer – Explore JSON VisuallyView JSON as a collapsible tree online. Expand only the branches you need instead of scrolling through long, deeply nested text.

Advanced JSON tools

Need more than the basics? Our developer tools go further.