Formatters

Pretty-print and minify in one click

JSON, SQL, XML, YAML, HTML, CSS, JavaScript. Each formatter shows a side-by-side preview and respects your indentation preferences.

11 tools

Choosing between these tools

A formatter earns its place twice: once when it makes a wall of minified text readable, and once when it refuses to parse and tells you where the file is broken. The second use is the one that saves an afternoon — a JSON body that fails at line 412 column 9 is a far better bug report than "the API returned nothing".

JSON, YAML, XML and SQL each fail in their own way. YAML punishes tabs and ambiguous booleans; XML cares about namespaces and unescaped ampersands; SQL formatting is mostly about making a long WHERE clause reviewable. The JSON diff tool is the one to reach for when two responses should be identical and are not — it shows the changed keys instead of making you scan two blobs.

The beautifiers for HTML, CSS and JavaScript also minify, which is useful for checking how much a file would actually shrink before wiring a build step to do it. Formatting happens locally in your browser, so you can paste a production payload without sending it anywhere.