Format, Validate, Minify — One Paste
Paste any JSON into the left pane and click Format: the tool parses it with the browser's native JSON.parse and re-serializes it with 2-space indentation. Because parsing happens first, formatting doubles as validation — invalid input never produces half-formatted output, it produces the parser's exact error message instead. Click Minify to go the other way: all insignificant whitespace is stripped, which is what you want before shipping a payload or embedding JSON in a config.
A one-line API response like {"user":{"id":42,"name":"Ada","roles":["admin","dev"]}} becomes a readable, indented tree in one click — and minifies back to 52 characters when you're done inspecting it.
Reading the Error Messages
When validation fails, you see the real JavaScript parser error, usually with a position. The most common culprits:
| Broken input | Why it fails |
|---|---|
{'key': 'value'} | JSON requires double quotes, never single quotes |
{"key": "value",} | Trailing commas are invalid in JSON (unlike JavaScript) |
{key: "value"} | Keys must be quoted strings |
{"n": 01} | Leading zeros are not allowed in JSON numbers |
{"note": undefined} | undefined, NaN and comments don't exist in JSON |
If you're pasting from a JavaScript file, remember JSON is a stricter subset: no comments, no trailing commas, no unquoted keys.
Pretty vs. Minified — When to Use Which
- Formatted (2-space): debugging API responses, code review, config files humans edit, documentation examples.
- Minified: production payloads, environment variables, HTTP request bodies — whitespace is pure overhead on the wire.
Minifying only removes whitespace between tokens; strings and values are untouched, so the data is byte-for-byte semantically identical.
Your Data Stays on Your Machine
Everything runs entirely in your browser — nothing is sent to a server, so it's safe to paste API keys, tokens, or customer data that happens to be inside a JSON blob. For converting JSON to spreadsheet-friendly formats, try the JSON to CSV converter; to compare two versions of a JSON file, use the diff checker.