JSON Formatter

Pretty-print, validate, or minify JSON. Reports parse errors with helpful context.

Output

โ€”

What "valid JSON" means

  • Keys must be double-quoted strings: {"a": 1} not {a: 1} (the latter is JavaScript object literal, not JSON).
  • No trailing commas: [1, 2,] is invalid.
  • No comments. JSON doesn't allow // or /* */.
  • Numbers can't have leading zeros (except 0 itself).
  • Single quotes are not allowed for strings or keys.

Why minify?

Removes all whitespace โ€” useful for embedding JSON in environment variables, transmitting over the wire, or storing compactly. Doesn't change the data, just the bytes.