JSON Formatter and Validator
Paste JSON to pretty-print it, minify it, browse it as a tree, and find out exactly which line is broken. It is parsed by JavaScript in this tab. Nothing is sent anywhere, and it keeps working with the network unplugged.
Your JSON
Paste some JSON on the left and the formatted version shows up here.
It runs in your tab, and you can check
Pasting JSON into a website means pasting it onto somebody's server. That has gone badly in public. A security report in January 2026 counted more than eighty thousand credentials sitting in the logs of two well known online formatters, and in April the most installed JSON viewer for Chrome went closed source and started injecting ads for people who already had it installed.
This page does not work that way. The parser is JavaScript that came down with the page. Open your browser's network panel and format something: nothing goes out. Pull the network cable and it still works. The page keeps your draft in this browser's own storage, and that is the only place it ever gets written.
The error says where, not just that something is wrong
"Unexpected token" is not an error message, it is a shrug. When the parse fails you get the line and the column, that line printed out, and a caret under the character it stopped on. Then it says what it wanted instead: a trailing comma before a closing brace, a property name that needs double quotes, a string that opened on line 12 and never closed, a comment JSON will not take, NaN where a number belongs, or a document that got cut off with two brackets still open. One button jumps your cursor to the spot.
Fix it, then read what it changed
Broken JSON usually breaks in the same few ways, because it came out of a log, a config file or a Python print. Fix it handles trailing commas, single quotes, curly quotes, unquoted property names, line and block comments, NaN and Infinity, True, False and None, undefined, missing commas, hex numbers, a byte order mark, and the guard prefix some APIs put in front of a response.
It also knows the two shapes logs produce: several documents pasted one after another, which it wraps in an array, and a document still sitting inside its quotes as one escaped string, which it unwraps.
Then it lists what it changed. A repair is a guess at what you meant, so you should look at it.
Three things other formatters quietly break
- Big numbers survive. Run 7203415887654321987 through JSON.parse and you get 7203415887654322000 back, because a JavaScript number cannot hold it. This page keeps the digits you pasted.
- So does the key order. Parsing into a JavaScript object shoves every key that looks like a whole number to the front, so a document whose first key is "2" comes back rearranged. Here the order is the order you wrote.
- A duplicate key gets called out. Every parser keeps the last one and drops the first without saying a word. When there are two, this page names the key, both lines, and the value that wins.
Format it, minify it, or walk the tree
The formatted view indents with two spaces, four spaces or a tab, and it can sort the keys. The minified view tells you how many bytes that saves. The tree view folds branches, searches keys and values at the same time, and copies the path to any row as a JavaScript accessor or as a JSON Pointer, which is the form an API validation error usually hands you.
Common questions
Is my JSON sent anywhere?
No. JavaScript in this tab parses it. There is no upload and no account, and the page makes no request to any server once it has loaded. Your draft stays in this browser's local storage and nowhere else.
Can I open a file instead of pasting?
Yes. Use Open file, or drop a file onto the box. The browser reads files up to 10 MB straight off your disk, the same way it reads a paste.
What does the Fix it button actually change?
Trailing commas, the wrong kind of quotes, unquoted property names, comments, NaN and Infinity, Python's True, False and None, missing commas, and input that got cut off. It lists every change it made rather than rewriting your document quietly.
Why do big numbers come out different in other tools?
Because they parse to JavaScript numbers, which lose precision above about nine quadrillion. A Discord or X id comes back as a different number. This page keeps the digits exactly as you wrote them.
Writing to a limit rather than reading an API response? The word and character counter has a meter for every platform, and the Markdown to PDF converter turns a draft into a clean file. All of the free tools work the same way: no account, no watermark, nothing stored.