Search tools

JSON Formatter

Pretty-print JSON with 2 spaces, 4 spaces or tabs, and see exactly where it is invalid.

Data

Format

What the formatter does and does not do

  • Values stay exactly as written: Only whitespace changes. The original text is formatted, not parsed into JavaScript numbers, so values above 9,007,199,254,740,991 keep every digit, 1.0 stays 1.0 and escape sequences in strings are kept.
  • Nothing is repaired: The JSON standard is followed strictly: comments, trailing commas, single quotes and unquoted keys (JSON5, JavaScript objects) are reported as errors with their position, because other JSON parsers would reject them too.
  • Duplicate keys are flagged: JSON allows repeated keys, but most programs keep only the last one. The formatter keeps both and warns you.

Frequently asked questions

Is there a size limit?

Inputs up to 5,000,000 characters work, which covers large exports. Very large results may take a moment to appear in the output field.