Format
JSON Formatter
Paste JSON on the left. It's validated and pretty-printed on the right as you type — with the exact line and character of any syntax error, so you're not hunting for a missing comma by eye.
Format
Paste JSON on the left. It's validated and pretty-printed on the right as you type — with the exact line and character of any syntax error, so you're not hunting for a missing comma by eye.
Walkthrough
Use cases
Debugging an API response. Minified JSON from a network tab or a curl response is unreadable on one line. Pasting it here turns it into something you can actually scan for the field you're looking for.
Cleaning up a config file. Hand-edited JSON config files often end up with inconsistent spacing. Running them through the formatter normalizes indentation before you commit.
Validating before you ship. A trailing comma or an unquoted key will break a JSON.parse() call in production. Catching the exact error location here is faster than a stack trace.
FAQ
No. Parsing and formatting happen with JavaScript's built-in JSON.parse and JSON.stringify, entirely in your browser. Nothing you paste here is transmitted, logged, or stored — closing the tab clears it completely.
The most common causes are trailing commas (valid in JavaScript objects, not in JSON), single quotes instead of double quotes, or unquoted keys. The error message includes the character position so you can jump straight to it.
Not currently — this tool validates against strict JSON (RFC 8259), the same standard used by JSON.parse. Comments and trailing commas will be flagged as errors, which is intentional since most JSON consumers won't accept them either.
No hard limit is enforced, but very large payloads (multiple megabytes) may feel slower since formatting runs on the main thread. For typical API responses and config files, it's instant.
Related