Free tool
Free JSON Formatter & Validator
Paste your JSON below to beautify, minify, or validate it. If something's wrong, you'll get a clear error pointing at exactly where it broke. Everything runs locally in your browser - your data is never uploaded or stored.
JSON Formatter & Validator
Paste JSON below, then Beautify, Minify or just check it's valid.
How to format and validate JSON
- Paste your JSON into the box.
- Press Beautify to lay it out with two-space indentation, or Minify to remove every unnecessary space and line break.
- If the JSON isn't valid, the message tells you the line and column where it broke.
- Copy the result, or Clear to start again.
Why JSON usually fails
Most errors come down to a handful of mistakes, usually from editing by hand or copying out of JavaScript:
- A trailing comma after the last item in a list or object.
- Single quotes instead of double quotes around text and keys.
- Keys with no quotes at all, such as name: instead of "name":.
- Comments, which JSON doesn't allow.
- A missing closing bracket or brace, often a long way from where the error is reported.
The line and column show where reading gave up, which is sometimes just after the real mistake, so check the few characters before that point too.
Beautify or minify?
Beautified JSON is for people. It makes an API response, a configuration file or exported data easy to read and to check. Minified JSON is for machines. It is smaller, so it suits storing, sending in a request or pasting into a single-line field. The data is identical either way; only the spacing changes.