JSON Formatter
Paste JSON and get it back indented and readable, with syntax errors reported at the exact line and character. Choose 2 or 4 spaces, or minify to strip every byte of whitespace. Parsing uses the browser's own JSON engine, so nothing is sent to a server — safe for a payload with real keys in it.
Runs in your browser — nothing is uploaded
Questions
- Why does it say my JSON is invalid?
- Almost always one of four things: a trailing comma after the last item, single quotes instead of double, an unquoted key, or a comment. All four are legal JavaScript and none are legal JSON. The error message names the character position — look just before it.
- Can I paste sensitive data?
- Yes. Parsing and formatting happen in your browser with JSON.parse; nothing is transmitted. You can disconnect from the internet and it still works, which is the test worth doing before pasting a production response into any online formatter.
- What is the difference between formatting and minifying?
- They are the same data. Formatting adds indentation and newlines so a human can read it; minifying removes every optional byte so it transmits faster. Format for debugging, minify for anything going over a wire.
- Does it change my data?
- No, but it does normalise it: key order is preserved, while duplicate keys collapse to the last one and numbers are re-serialised in their canonical form. That is JSON.parse behaving correctly, not the tool editing your data.
What people use next
- JSON ↔ CSV ConverterConvert JSON arrays to CSV or parse CSV back to JSON. Handles quoted fields and special characters.
- SQL FormatterBeautify SQL queries with dialect support for MySQL, PostgreSQL, and BigQuery. Control keyword case.
- Base64 Encoder & DecoderEncode text to Base64 or decode Base64 strings back to plain text. Supports Unicode.