JSON ⇄ Pretty JSON

JSON formatter / validator

Format, minify and validate JSON — everything runs locally in your browser.

Result
Result will appear here
Paste JSON to validate it.
Keys: 0 Depth: 0 Bytes: 0

JSON Formatter and Validator

This free online JSON formatter and validator pretty-prints, minifies and checks JSON. When the JSON is invalid, it shows the exact line and column of the first error. Everything is processed in your browser, so your data is not uploaded to a server.

How to format JSON

  1. Paste your JSON into the input box.
  2. Choose Format and pick an indent size.
  3. The formatted result appears automatically.
  4. Click Copy or Download.

How to minify JSON

  1. Paste your JSON into the input box.
  2. Choose Minify.
  3. Copy the compact single-line result.

Common JSON errors

  • Trailing comma: remove the last comma in an object or array.
  • Single quotes: keys and strings need double quotes.
  • Unquoted keys: {a:1} is JavaScript, not JSON.
  • Comments: JSON does not allow // or /* */.
  • Special values: undefined, NaN and Infinity are invalid.

Does it change my numbers?

Numbers are parsed as standard JavaScript numbers, so integers above 9,007,199,254,740,991 can lose precision. Keep very large IDs as strings.