JSON Formatter

Pretty-print or minify JSON, with the exact location of any syntax error. Everything runs in your browser.

Indent:

Processed on your device. This file is never uploaded.

  1. 1Paste your JSON into the left box.
  2. 2Pick an indent width, or choose Minify.
  3. 3Copy the formatted result from the right.

Readable JSON, and the opposite

Machine-generated JSON usually arrives as one unbroken line. Pretty-printing re-indents it so the structure is visible at a glance — nested objects step inward, arrays line up — which is what you want when debugging an API response. Minifying does the reverse, stripping every non-essential byte for when the JSON has to travel somewhere small.

Errors with a location

A browser's built-in parser will tell you something is wrong but rarely where. This tool recovers the character offset from the parse failure and converts it to a line and column, so instead of "unexpected token" you get the precise spot to look — almost always a stray comma or a mismatched quote.

Frequently asked questions