TOOLS · JSON FORMATTER
Format and validate JSON in your browser.
Paste in JSON that's minified, messy, or you're just not sure is valid — get clean, indented output or a clear error pointing at what's wrong. Nothing you paste here leaves your device.
Why Format and Validate JSON?
JSON that comes out of an API response, a log file, or a minified config is usually crammed onto one line with no spacing, which makes it nearly impossible to read or debug by eye. Formatting adds consistent indentation and line breaks so the structure — which keys are nested inside which objects, where an array starts and ends — becomes visible at a glance.
Validation matters just as much: a single missing comma or an unescaped quote makes an entire JSON document invalid, and the earlier you catch that, the less time you spend chasing a downstream error that was actually a malformed payload.
How This Tool Works
Paste in JSON and it's parsed and re-printed with clean indentation, or you'll get a clear error pointing at what's wrong if it isn't valid. Everything runs in your browser — nothing you paste here is sent to a server.
Common Uses
- Making sense of a minified API response while debugging.
- Checking whether a config file or payload is actually valid JSON before using it somewhere that will reject it.
- Cleaning up JSON before pasting it into documentation, a bug report, or a code review.
Frequently Asked Questions
What typically makes JSON invalid?
The most common culprits are trailing commas after the last item in an object or array, missing quotes around keys, single quotes instead of double quotes, and unescaped special characters inside strings — none of which are allowed in strict JSON, even though some are fine in JavaScript object literals.
Does this support JSON5 or JSON with comments?
No — this validates against strict JSON, the same standard used by JSON.parse() and virtually every API. JSON5 (which allows comments, trailing commas, and unquoted keys) is a different, looser format.
Can this also minify JSON, not just format it?
Yes — the same parser that formats JSON with indentation can also collapse it back down to a single compact line when you need the smaller version instead.