Skip to main content

JSON Formatter & Validator

JSON Formatter re-indents a JSON document so it can be read and reviewed, and points out the first syntax error if it is not valid.

How to use it

  1. Paste your JSON into the input box
  2. Choose an indentation (2 spaces, 4 spaces, or a tab)
  3. Click Format to get a readable result, or a clear error if it's invalid

Paste minified or hand-broken JSON, choose 2 spaces, 4 spaces or a tab, and it is parsed by the browser's JSON engine and printed back cleanly. Parsing is strict — comments, trailing commas and single-quoted strings are rejected. Because it round-trips through the engine, duplicate object keys collapse to the last value, keys that look like integers are re-ordered numerically ahead of the rest, and integers past plus or minus 2^53 or very long decimals lose precision. For the opposite goal — the smallest payload — use JSON Minifier, which validates the same way but removes whitespace instead of adding it. Input is limited to 2 MB, about 100,000 values and 64 nesting levels, and nothing is uploaded.

FAQ

We use cookies to run this site and, with your consent, to understand usage and personalize ads. You can change your choice at any time.