jsontoolskit.org
JSON and JSON Schema utilities, in the browser
Say hi →

JSON Formatter

pretty-print · 2 / 4 / tab indent · sort keys · minify

Paste JSON, get a clean indented copy. Pick indent size (2, 4, or tab), optionally sort keys recursively for stable diffs, and copy or download the result. Strict RFC 8259 parsing — errors highlight the exact line and column. Nothing leaves your browser.

Ready.

How to format JSON

  1. Paste your JSON into the input panel (or drop a .json file). Validation is live — errors highlight as you type.
  2. Pick Indent2 spaces (default), 4 spaces, Tab, or Minify (no whitespace).
  3. Toggle Sort keys if you want alphabetical ordering applied recursively (helps with stable diffs).
  4. The output appears in the right-hand panel. Copy copies, Download saves as .json.
  5. The status bar shows input size, output size, and key / array / depth counts.

Common pitfalls

FAQ

What is the difference between formatter and minifier?

Formatter adds whitespace to make JSON readable; minifier strips it to make JSON small. Use formatter for humans, minifier for transport.

Why does sorting keys help with diffs?

If two API consumers serialize the same object with different key order, a diff tool reports them as different. Sorting both first normalises the order; the diff then shows only real differences. The JSON diff tool also has an Ignore key order toggle.

Will it work offline?

Yes. After the page loads once, the JSON formatter is plain JavaScript — disconnect and it still works.

Is there a file size limit?

Bounded by your browser's memory (typically 100 MB+ before things slow down). Very large documents (>50 MB) may make the textarea sluggish — drop the file instead of pasting.