Tree explorer will appear here once JSON is loaded
Select a node to inspect it
Tree explorer will appear here once JSON is loaded
Select a node to inspect it
Pretty-printing takes any valid JSON - however it is spaced, ordered, or nested - and lays it out with consistent indentation, one value per line, so the structure is visible without mentally parsing brackets. It is the step most people reach for right before pasting JSON into a pull request, a bug report, or a chat thread.
The optional sort-keys mode reorders every object's keys alphabetically as part of pretty-printing, which produces a stable, predictable output - two JSON documents with the same data but different key order become byte-for-byte comparable once both are sorted and pretty-printed, which is exactly what a text diff needs to be useful.
Numbers are re-emitted from their original source text, not round-tripped through a JavaScript number, so pretty-printing never quietly changes a 19-digit ID or a long decimal price - what goes in numerically is what comes out.
Pretty-printing is a single undoable step against your pasted text, and runs in the same background worker as parsing, so it stays instant even on a large document.