JSON Pretty Print
Transform compressed JSON into a highly readable "Pretty" format
Turn a wall of JSON into something you can actually read
APIs, logs and database exports often deliver JSON as one long unbroken line. That is efficient for machines and miserable for people. JSON Pretty Print reformats such text with consistent four-space indentation, puts each property and array item on its own line, and colors the pieces so you can tell keys from values at a glance. It is meant for reading and reviewing, so the output panel is styled like a small code viewer.
How to pretty print a document
- Paste your JSON into the JSON Data box. If it is on your clipboard already, the Paste button reads it in for you, provided the browser allows clipboard access.
- No data handy? Load Sample JSON inserts a deliberately minified example so you can see the difference.
- Click Pretty Print JSON. The page scrolls to the result.
- Read the dark output panel. Keys appear in indigo, strings in green, numbers in amber, booleans in pink and null in grey.
- Use Copy Result to copy the plain formatted text, or Download to save it as a file called pretty-json.json.
A Bytes counter in the header shows the size of your pasted input, which is handy when you want a rough sense of the payload you are dealing with.
What you can and cannot adjust
There are no indentation or sorting settings here. The tool always uses four spaces and always keeps keys in their original order. That predictability is useful when you are comparing two outputs, because the same input always produces identical text. If you need tabs or two-space indents, you will need to reformat afterward in your editor.
Typical situations
- Reading an API response copied from browser developer tools or a curl command.
- Cleaning up a configuration or settings blob before adding it to a repository or ticket.
- Making a JSON snippet presentable for documentation, a code review comment or a support message.
- Checking nesting when a value seems to be missing, since the indentation makes structure obvious.
Good to know
- The text must be strict JSON. Comments, single quotes and trailing commas cause an Invalid JSON dialog that explains the parser error.
- Formatting runs in your browser through JavaScript, and the copied and downloaded text has no color markup, only clean indented JSON.
- Colors are added by a simple pattern match on the printed text, so they are for reading only and do not affect the data.
- Large payloads produce very long output; the panel scrolls, but browsers can slow down on multi-megabyte input.
- Parsing and reprinting can change number representation slightly, for instance 1.50 becomes 1.5 and huge integers may lose precision.
Related Tools