JSON Formatter

Paste JSON and get it pretty printed, minified, or compared with a second value. Everything runs on your device - nothing is ever uploaded.

Runs entirely on your device - nothing is ever uploaded.

More tools

How to use JSON Formatter

  1. Paste your JSON on the left - or Upload a .json file. Live mode formats as you type.
  2. Click Format to pretty print, Minify to compress, Validate to check, or Repair to auto-fix trailing commas, comments and single quotes.
  3. Switch to Tree to explore nested data, or Diff and paste a second JSON value to see what was added, removed, or changed.

What it is for

A JSON formatter turns a compressed wall of text into readable, indented structure, and catches the missing comma or bracket that breaks an API response or config file. Developers use it daily to inspect payloads and fix broken JSON.

How it works

The text is parsed with your browser's built-in JSON parser. Valid input is re-printed with your chosen indent or minified; invalid input shows the error with its line and column so you can find the exact spot. Diff compares two parsed values: object keys by name, and array items by position. The stats line reports the type, key count, nesting depth and byte size. Nothing leaves your device.

When JSON breaks

Almost every JSON error is one of four slips: a trailing comma after the last item, a comment pasted from documentation, single quotes instead of double, or a missing bracket. The Repair button fixes the first three automatically and re-validates; if the structure itself is broken, the line-and-column error points at the spot to fix by hand.