Free tool
JSON Formatter, Validator and Fixer with a Tree View
An API reply arrives as one unreadable line, or a config file refuses to load and nobody can see why. Paste it here to lay it out, find the exact mistake, repair the usual slips and look inside it as a tree. Rules from RFC 8259 were read on 22 October 2026.
This file is big, so it is kept out of the text box to keep the page quick. The result is on the right.
The formatted JSON shows here.
Paste on the left, open a file, or press Example to see a broken one fixed.
Comments, trailing commas, single or curly quotes, keys without quotes, missing commas between lines, True, False and None, and several objects in a row. Every change is listed, with an undo.
Options
Tree
Keys
- Cmd Enter Format
- Cmd Shift Enter Minify
- Option Shift F Fix
- Cmd S Download
- / Search
On Windows, use Ctrl for Cmd and Alt for Option.
Your JSON is read by your own browser and never uploaded or saved, so API keys and private data stay with you. Only the layout options you pick are remembered on this device.
When a response is one long unreadable line
Paste or type into the Input box, open a file, or press Example to see a broken sample fixed. The Result side shows four views: JSON, Tree, YAML and CSV. In the JSON view you can switch between Formatted, which spreads it out with indentation, and Minified, which removes every space that is not needed.
Indent can be 2 spaces, 3 spaces, 4 spaces or tabs, and a tick box sorts keys from A to Z, which makes two versions of a file easier to compare. Check as I type validates while you work, so a mistake is marked with its line and column as soon as it appears. Large files are read in the background and drawn a screen at a time, so the page stays quick.
What strict JSON does not allow
Most errors come from text that is fine in JavaScript or Python but not in JSON. The grammar in RFC 8259, published in December 2017, has no comment syntax, and its rules for arrays and objects expect a value after every comma, so a trailing comma is a mistake. The same document says member names in an object should be unique, and warns that software receiving duplicates behaves in unpredictable ways, since some keep the last one and some stop with an error. Source: RFC 8259, read 22 October 2026.
This tool follows those rules when it checks, and it flags repeated keys and whole numbers too long for JavaScript to hold exactly.
What the Fix button repairs
Fix common mistakes handles the slips people meet most. It lists every change it made, and offers an undo, so you can see what it decided on your behalf.
| Problem found | Repair |
|---|---|
| Comments | Removed |
| Trailing commas | Removed |
| Single or curly quotes | Changed to straight double quotes |
| Keys without quotes | Quoted |
| A missing comma between lines | Added |
| True, False and None | Changed to true, false and null |
| Several objects in a row | Read as separate values |
Always read the change list when the data matters. A repair is a guess about what you meant, and a wrong guess in a price list is worse than an error message.
Looking inside, and moving to another format
The Tree view shows the structure as folded branches. Click a key to see its path, then use Copy path or Copy value. Open all and Close all expand or fold everything, and a slash key jumps to search.
- The YAML tab shows the same data in YAML, handy for config files.
- The CSV tab flattens a list of records into rows and columns. For more control over nested fields, use the JSON to CSV tool.
- Download saves the current view as a file, and Copy puts it on the clipboard.
Shortcuts: Command Enter formats, Command Shift Enter minifies, Option Shift F fixes, and Command S downloads. On Windows use Control and Alt.
Where it helps in site and app work
Form tools, CMS exports, analytics events and payment webhooks all speak JSON. When we connect a website to another service, reading a real sample payload comes first, and then we match fields. Our Webflow integration page covers that kind of work. A tidy, validated sample is also the best thing to attach to a support ticket.
Before pasting anything, remove real keys and customer details if a sample will be shared with other people. The page does not send your text anywhere, but a copy in a chat or a ticket lives on.
For comparing two versions of a response, format both with the same indent and sorted keys, then compare them side by side with a diff tool. Sorted keys remove most of the noise that comes from a different order.
Frequently asked questions
How do I format JSON?
Paste it into the input box and the formatted version appears on the right. Choose your indent size, or press Command Enter.
Why does my JSON say it has an error?
The message gives a line and column and marks the line in the input. Usual causes are a trailing comma, single quotes, an unquoted key or a missing comma.
Does JSON allow comments?
No. The grammar in the standard has no comment syntax, so remove them or use the Fix button, which strips them and lists the change.
What is the difference between formatted and minified?
Formatted is spread over lines with indentation for people to read. Minified removes all spaces that are not needed, which makes it shorter for sending.
Can it turn JSON into YAML or CSV?
Yes. Use the YAML and CSV tabs in the result area, then copy or download what you see.
Is my data sent to a server?
No. It stays in your browser and is not saved, although your settings are remembered on your device.
More free tools
- JSON to CSV converter: Turn JSON into CSV or Excel with nested fields as columns, and CSV back into JSON.
- YAML formatter: Check and tidy YAML, keep comments, and view it as JSON, a tree or compact flow style.
- XML formatter: Indent, minify and check XML, repair common slips, or turn it into JSON.
- Diff checker: Compare two texts or files side by side, merge changes and export a diff.
- JWT decoder: Decode a JSON Web Token, read its claims and expiry, and check the signature with a key.