Tools · Text · JSON formatter and validator
JSON formatter and validator
Validate JSON as you type, pretty-print it or minify it, and see the exact line and column of any syntax error.
Add a file and run the tool.
Your file is ready.
Try a different file, or try again.
Settings
Adjust the settings below. The result updates as you go.
Runs fully in your browser. Nothing is uploaded.
Runs fully in your browser. Nothing is uploaded.
How it works
Paste your JSON.
It's validated and formatted instantly - switch to Minify if you want it compact instead.
Copy the result, or fix the error at the exact line and column shown.
Frequently asked questions
No. Everything happens in your browser - not even to check if it's valid.
Yes - the exact line and column, not just "invalid JSON".
Yes. Switch to Minify mode and the same JSON comes back with no extra whitespace.
No. This tool validates strict JSON (RFC 8259) only. Comments, trailing commas and unquoted keys are reported as syntax errors, not silently accepted.
They are kept exactly as you wrote them. A repeated key reads without an error, but programs disagree on which value wins (JavaScript keeps the last one), so the formatter does not choose for you and your data is never edited without you knowing.
Guides
A closer look at specific problems this tool solves.
Why You Can't Just Eyeball a Broken JSON File
A missing comma or an extra brace in a long JSON blob is nearly invisible to a person scanning the text, but exact to a parser. Here's why that gap exists, and what actually closes it.
Read the guideHow to Format and Validate JSON (And Fix the Error When It's Not Valid)
Paste JSON in and it's validated live: pretty-printed or minified, or told exactly which line and column broke it. Here's the whole process, mode by mode.
Read the guideJSON Format vs Minify: Which One Do You Actually Need
Format and Minify aren't interchangeable settings - one is for a person about to read the JSON, the other for a machine about to store or send it.
Read the guide
Comments