Free online JSON editor with live validation
JSON editor with the text and the tree in step
This JSON editor is free and needs no account: type in the left pane and it is validated on every keystroke, with the broken line marked in the numbered ruler and one click to land your caret on the character at fault. The tree on the right is not a preview — rename a property, change what a value holds, delete a node or add one, and the text rewrites itself to match. Undo reaches back 50 steps, Export saves the result as a file, and long number literals come through every edit with all their digits intact.
- 100% free
- No signup
- Validates as you type
- Edit from the tree
- 50-step undo
Nothing loaded. Start from the example config, or paste your own.
Start typing, or press Ctrl+V outside the text pane to bring in whatever is on the clipboard.
How to edit a JSON document
Load it, reshape it from either side, then take the result away.
Load the document and keep an eye on the ruler
Type into the left pane, press Ctrl+V (⌘V on a Mac) outside it to take whatever is on the clipboard, or use Open .json for a file of up to 5 MB. Validation follows every keystroke: the numbered ruler marks the broken line in red, the bar at the foot names the line, the column and the cause, and Put the caret there drops your cursor on the exact character.
Reshape the document from the right-hand tree
Select a node and the strip below both panes lets you rename the property, switch what it holds — text, a number, true, false, null, an empty object or an empty array — and Apply the change. The × on any row removes it, Add property extends an object, and Append element grows an array. Each edit rewrites the text pane immediately, so the two views can never drift apart.
Step back if you were wrong, then export
Undo walks back through the last 50 tree edits, re-layouts and file loads, and Re-lay out reprints the whole document with 2 spaces, 4 spaces or tabs when you want the indentation changed rather than the content. Copy puts the finished JSON on the clipboard and Export saves it as edited.json.
Technical specifications
| Documents it edits | Any RFC 8259 document up to 5 MB, from .json, .webmanifest, .map or .txt; a .jsonc file has to lose its comments first, because JSON has none |
|---|---|
| Validation cadence | Every keystroke — about 3 ms for a 200 KB config and about 80 ms for a 5 MB document, run against the settled value so typing never waits on the parser |
| Error report | Line, column and a cause in plain English; the ruler turns that line red and Put the caret there selects the offending character in the text pane |
| Tree operations | Rename a property, replace a value with text, a number, true, false, null, an empty object or an empty array, delete any node, add a property, append an element |
| Undo depth | 50 steps across tree edits, re-layouts and file loads; typing in the text pane keeps the browser's own character-level undo |
| Write-back | Edits reprint the document with 2 spaces, 4 spaces or tabs — property order, duplicate names and number literals all survive the round trip unchanged |
| Structure pane | 100 children listed per container with more on request, 1,500 rows in total, and nesting read to 500 levels |
| Export and cost | Copy to the clipboard or save as edited.json; free, no account, and every step runs inside this browser tab |
Frequently asked questions
Why does a 19-digit ID change when I save my JSON elsewhere?
Because the tool that saved it turned the number into an IEEE 754 double, and a double holds integers exactly only up to 9,007,199,254,740,991 — two to the fifty-third, minus one. Above that the nearest representable value is substituted, which is why a Snowflake ID like 1275892450392698880 comes back as 1275892450392699000 with the last three digits invented. This editor never converts a number to a JavaScript value: the literal you type is the literal it writes, digit for digit. When the identifier has to survive systems you do not control, RFC 7493 gives the durable answer — carry it as a string, the way Twitter shipped id_str alongside id.
Can I add or rename a key without touching the text?
Yes — that is what the tree on the right is for. Select any node and the strip underneath renames the property, replaces its value, or deletes it outright; select an object and Add property drops a new member in; select an array and Append element grows it by one. Every operation is applied to the parsed document and re-printed into the text pane, so you are never editing two copies that can disagree.
Why did the tree stop letting me edit?
Because the text no longer parses, and applying a structural edit to a document nobody can read would corrupt it. While the syntax error stands, the tree keeps showing the last version that did parse — greyed for editing but still there to read, instead of blinking out of existence every time you delete a brace. Fix the line the ruler has marked and the edit controls come straight back.
Why did adding one key re-indent my whole file?
Because a tree edit is applied to the parsed document and then the document is printed again, which lays every line out with the indent chosen in the toolbar. Only the whitespace moves: property order, duplicate names and number literals all come through the reprint exactly as they were. If the original spacing mattered, undo the edit and make the change in the text pane instead, where nothing is reprinted at all.
What does Undo cover here?
The last 50 structural changes — renames, value replacements, deletions, additions, re-layouts and file loads — each restoring the document as it stood before that step. Typing in the text pane is deliberately left to the browser: a textarea already has a character-level undo that knows about your selection, and shadowing it with a coarser one would make ⌘Z less useful, not more.
Does it check my document against a JSON Schema?
No — this page validates syntax, not shape, so it will happily accept a perfectly formed document that is missing a required field. Checking types, required keys and enum values against a contract is a different job, done by the JSON schema validator, and inferring a first draft of that contract from a sample payload is done by the JSON to JSON Schema tool.
Is anything I type sent to a server?
No. Parsing, editing and printing all run as JavaScript in this tab, and the only bytes that ever leave it are the ones you put on the clipboard or save with Export — so a config file holding real credentials can be edited here without it going anywhere.
About editing JSON safely
An editor has to hold two pictures of the same bytes at once — the characters you are typing and the structure they describe — and keep them honest about each other. The usual shortcut is to run the text through JSON.parse, mutate the resulting JavaScript object, and serialise it back. That round trip is lossy in three quiet ways: a property whose name looks like a non-negative integer is moved ahead of its neighbours, a name written twice loses its first occurrence, and every number is rebuilt from a float. What you get back is a document that validates and is no longer yours. Here the tree is the parse tree of your source text, edits mutate that tree, and a printer walks it back out — so the only thing an edit changes is the thing you edited, plus the indentation you asked for in the toolbar. If all you want is that indentation, the prettify tool does it without opening a tree at all.
Numbers deserve the detail because they are where silent corruption lives. JSON puts no bound on how many digits a number may have, but almost everything that reads JSON stores it in an IEEE 754 double, which represents integers exactly only within plus or minus two to the fifty-third. RFC 8259 is explicit that interoperability is only guaranteed inside that window, and RFC 7493 goes further, telling I-JSON senders to encode anything outside it as a string. That is the whole reason platform APIs ship a second field — id for the number and id_str for the same value spelled out — after a generation of clients quietly rounded the last digits off user IDs. Type a twenty-digit literal into this editor, add a key beside it, export the file, and every digit is still where you left it.
The last thing an editor owes you is a refusal to guess. When the text stops parsing, the structure pane freezes on the last version that did and the edit controls go dead, rather than applying your rename to a stale copy of the document and writing the result over what you were typing. Syntax, though, is only the first gate: a file can parse perfectly and still be missing the field your deploy needs, which is what the JSON schema validator is for. When the document is simply too large to reshape by hand — a production dump rather than a config file — read it in the JSON viewer first, find the branch that matters, and bring only that piece back here.
Where your edits are made
Every keystroke, every tree operation and every reprint happens in this browser tab; no draft is uploaded, auto-saved or recovered later, and there is no server copy to leak. Refreshing the page therefore throws the document away — export before you close it.