JSON Formatter & Validator

Pretty-print, minify, sort keys and pinpoint syntax errors by line and column.

Paste JSON and press Format, or use Ctrl/⌘ + Enter.

What this tool does

It parses your text with the browser's built-in JSON parser, then re-serialises it with the indentation you choose. Minify removes all optional whitespace to produce the smallest valid output. Sort keys orders object keys alphabetically at every level, which makes two documents easy to compare.

Common JSON errors

Privacy

Nothing you paste leaves your browser. There is no server component, so the tool keeps working if you lose your connection after the page has loaded.