JSON Formatter
Paste JSON to validate and pretty-print it. Runs entirely in your browser.
[ INPUT ]
[ OUTPUT ]
// waiting for valid JSON
About JSON Formatter
Formatting JSON makes nested structures readable and surfaces syntax errors like trailing commas or unquoted keys. This tool re-serialises your JSON with even indentation, or collapses it to the smallest valid form.
How to use it
- Paste or type JSON into the input.
- If it is valid, the formatted output appears; if not, the parse error is reported.
- Use the minify option to strip whitespace for transport or storage.
- Copy the result.
Frequently asked questions
- Is my JSON uploaded anywhere?
- No. Parsing and formatting happen in your browser using the built-in JSON engine. Nothing is sent over the network.
- Why does it say my JSON is invalid?
- Common causes are trailing commas, single quotes instead of double quotes, unquoted keys, or comments — none of which are allowed in standard JSON. The error message points at where parsing failed.
- What indentation does it use?
- The formatted output uses a fixed, consistent indent so diffs stay stable. Minify removes all optional whitespace.