About JSON Validator & Formatter
Minified JSON from an API is one long line that no human can read, and a single missing comma makes a whole document invalid. This validates the syntax and reformats it with proper indentation so the structure is visible.
How to use it
- Paste or type your JSON, or enter a URL that returns JSON.
- Choose an indent width and format it.
- Copy the tidied output, or read the error if it will not parse.
Worth knowing
A validator reports the first error it reaches, and that is often just after the real mistake — a missing comma on an earlier line makes the next one look wrong. Work backwards from the reported position rather than staring at it.
Common questions
- Why is my JSON invalid?
- Trailing commas, single quotes and unquoted keys are the usual three. All are legal in JavaScript and none are legal in JSON.
- Can I load JSON from a URL?
- Yes. The request is made server-side, because browsers block most cross-origin fetches, and it only accepts public http and https addresses.