JSON Pretty Printer
Format and indent JSON so it is easy to read.
About JSON Pretty Printer
The JSON Pretty Printer takes raw, minified or messy JSON and reformats it with consistent indentation so the structure is instantly readable. It is the fastest way to make sense of an API response you just copied out of a log, a network tab or a terminal — nested objects and arrays line up, and the shape of the payload becomes obvious.
Formatting happens live in your browser as you type or paste; nothing is uploaded to any server, so it is safe to use with payloads that contain internal or personal data. Invalid JSON is flagged immediately with the parser error, which makes this a quick first check before you file a bug about a malformed response.
How to use
- Paste your JSON into the "JSON input" box — the formatted result appears immediately in "Pretty JSON".
- Pick 2 spaces, 4 spaces or tabs under "Indentation" to match your team's style.
- If the input is invalid, read the parser error shown below the boxes, fix the input and the output refreshes on its own.
- Copy the formatted result, or press "Clear" to start over. "Load sample" gives you an example payload to try.
Frequently asked questions
Is my JSON sent to a server?
No. The formatter runs entirely in your browser using the built-in JSON parser. Your payload never leaves your machine, so confidential API responses are safe to paste.
Why does my JSON fail to format?
The tool uses strict JSON parsing, so common issues are trailing commas, single quotes instead of double quotes, unquoted keys or JavaScript-style comments. The error message points at the first problem it finds.
Can I format multiple JSON objects at once?
This page expects a single JSON document. If you have several objects concatenated together — for example log lines — use the Multi JSON Formatter, which splits and formats each block separately.
Related tools
Multi JSON Formatter
Format many JSON blocks at once — even concatenated with no separator.
JSON Minifier
Collapse JSON into a single compact line.
JSON Validator
Check JSON syntax and pinpoint the first error.
JSON Cleaner
Fix JSON copied from Slack, Word or email — smart quotes, invisible characters, comments and trailing commas.
