JSON Editor
Edit JSON in a textarea on the left and see the parsed structure as an interactive tree on the right — pretty-print, compact, sort keys, or copy/download with one click.
Last updated: May 26, 2026
Find this tool useful? Support the project to keep it free!
Buy me a coffeeWhat is JSON Editor?
A JSON editor combines text-based editing with a structural view: you keep the freedom of editing the raw JSON in a textarea while seeing a collapsible tree that reflects every change as you type. Errors are surfaced immediately, so you can fix typos and missing commas without leaving the editor.
This tool parses your JSON on every keystroke and updates the tree view if the parse succeeds. The Pretty and Compact buttons reformat the textarea in place. Sort keys reorders every object's properties alphabetically — useful for diffs and for producing canonical JSON. Indentation can be set to 0 (compact), 2 spaces, 4 spaces, or a tab character.
How to Use JSON Editor
Paste or type JSON into the editor on the left.
The tree view on the right updates as you type; errors are shown inline.
Click Pretty / Compact to reformat the editor in place.
Toggle Sort keys to reorder all object properties alphabetically.
Copy or Download the formatted output.
Common Use Cases
- Editing a JSON config file in the browser before pasting it back into a project.
- Exploring the structure of a JSON API response with the tree view.
- Producing a canonical, sorted-key JSON output for diffing.
- Cleaning up a minified JSON blob into a readable form.
- Quickly checking that hand-written JSON is valid before pasting elsewhere.
Example Input and Output
A small JSON object with mixed types is parsed into a collapsible tree.
{"name":"Alice","age":30,"active":true,"tags":["a","b"]}{4 items}
"name": "Alice"
"age": 30
"active": true
"tags": [2 items]Privacy
All editing and formatting happens in your browser. No JSON is sent to a server.
Tree depth
The tree auto-expands the first two levels. Deeper levels are collapsed by default — click the arrow to expand any branch.

