Free JSON Formatter & Validator

Pretty-print, minify and validate JSON, with the exact parse error if it’s invalid.

Mode

Paste any JSON and it’s validated as you type. Switch between “Format” (indented and readable) and “Minify” (whitespace stripped, for shipping over the wire), and copy or download the result.

If the JSON is invalid, you get the exact parser error instead of a blank result, so you can find the problem quickly.

How to use it

  1. Paste your JSON.
  2. Choose Format or Minify (and an indent size for Format).
  3. Copy or download the result.

Frequently asked questions

What if my JSON is invalid?

The error message from the parser is shown, including roughly where the problem is (for example an unexpected character or a missing comma), so you can fix it in the source and paste again.

Does it support JSON5 or JavaScript object syntax (unquoted keys, trailing commas)?

No, this validates and formats strict JSON only, the same rules used by APIs and config files. Trailing commas, comments and unquoted keys will show as invalid.

Is my data sent anywhere?

No. Parsing and formatting happen entirely in your browser; nothing you paste here is ever sent to a server, which matters if it contains API keys or personal data.

What indent sizes are supported?

2 spaces, 4 spaces, or a tab character — pick whichever matches your project’s style.

More free tools

All text →