JSON Editor

Edit JSON with live validation and a tree preview.

Tree preview
The tree appears here while you type.

JSON Editor Online – Edit, Format, and Validate JSON

This JSON editor gives you a fast place to write and change JSON with instant feedback. Every keystroke is validated, errors point to the exact line and column, and a live tree preview shows the structure of what you're building. One-click actions format, minify, sort, and even repair the document.

Toolbar actions

  • Format – pretty-prints with 2 spaces, 4 spaces, or tabs.
  • Minify – compresses the document to a single line.
  • Sort keys – orders object keys alphabetically at every level.
  • Repair – fixes quotes, commas, comments, and other common problems automatically.
  • Undo – steps back through the last 50 toolbar changes.
  • Open File / Save / Copy – load a local .json file, download your edits, or copy them.

Editing with confidence

Hand-editing JSON is error-prone: one missing comma and the whole file is unreadable to your application. The editor keeps the status visible at all times, so you notice mistakes the moment you make them rather than when a deployment fails. Tab inserts indentation instead of leaving the text box, which makes it comfortable for writing nested structures by hand.

Tree preview

The panel next to the editor shows the parsed document as a collapsible tree with item counts. Click a node to see its JSONPath. It updates as you type, so it doubles as a sanity check that your nesting is what you intended.

Common uses

Tweaking request bodies before sending them to an API, preparing fixtures and mock data, fixing configuration files, and cleaning up JSON copied from documentation or chat.

More JSON tools

Compare your edited version with the original in JSON Diff, explore large files in the JSON Navigator, or convert the result with JSON to YAML and JSON to CSV.

Frequently Asked Questions

Yes. Every change is parsed immediately. Valid JSON shows a green badge and an updated tree preview; invalid JSON shows the error with its line and column.

It fixes common mistakes such as missing quotes, single quotes, trailing commas, comments, and Python-style True/None, then formats the result. Use Undo if you don't like the change.

Use Save to download the current text as data.json, or Copy to put it on the clipboard. The editor doesn't store anything on a server, so closing the tab discards unsaved changes.

Yes. Pressing Tab inserts your chosen indentation (2 spaces, 4 spaces, or a tab character) instead of moving the focus out of the editor.