JSON validator and formatter
Paste JSON to check it. Valid JSON is pretty-printed or minified on request; invalid JSON gets the exact line and column of the problem and a plain-English explanation.
Loading the tool…How to use it
- Paste JSON or drop a file.
- See instantly whether it is valid; errors are marked on the line where parsing stopped.
- Format with 2 or 4 spaces, minify, sort keys, or ask AI to repair broken JSON.
Private by design
The conversion runs as JavaScript in this tab. Your data is not uploaded, logged or stored, unless you choose the optional AI fix. There is no account and no file-size paywall.
The mistakes that break JSON most often
Trailing commas after the last item, single quotes instead of double quotes, unquoted keys, comments (JSON has none), NaN or undefined values, and unescaped line breaks inside strings. These are all fine in JavaScript source but not in JSON, which is defined by RFC 8259 and ECMA-404.
Reading the error position
The parser stops at the first character it cannot accept, so the real mistake is often just before the reported spot: a missing comma at the end of the previous line is reported at the start of the next key.
Questions
Is my file uploaded anywhere?
No. The file is read by JavaScript in this tab and never leaves your device. You can load the page, switch off Wi-Fi and it keeps working.
Is JSON Lines supported?
Yes. If the input has one JSON value per line, each line is validated and errors are reported by line.
What does the AI repair do?
It rewrites the broken JSON into valid JSON (fixing quotes, commas and comments) and lists what it changed. Review it before use: it is a suggestion, not a guarantee.
Can it convert JSON to CSV or YAML?
Use the JSON to CSV or JSON to YAML converters; both validate first.