JSON formatter
Runs entirely in your browser. Your files and data never leave your device.
About this tool
Paste raw or minified JSON here to pretty-print it with consistent indentation, check its syntax, or minify it back down to a single line. Syntax errors are reported with their position, so a malformed file is quick to fix.
What does formatting actually do to my JSON?
Under the hood, the tool parses your input and serializes it back out, which means it’s also a validity check: if the JSON doesn’t parse, you’ll get an error instead of a half-formatted mess. Pretty-printing re-serializes the parsed data with two-space indentation, so nested objects and arrays line up and become easy to scan. Minifying does the same parse-and-serialize step but with no extra whitespace at all, which is what you want before sending JSON over the network or storing it compactly. Because both directions go through a full parse, the formatter naturally handles deeply nested structures, escaped Unicode characters, and unusual number formats the same way a JavaScript engine would.
Why does it point to a specific character when something’s wrong?
Malformed JSON, like a trailing comma, an unquoted key, or a missing bracket, is one of the more tedious things to debug by eye, especially in a long minified string. Since the tool parses your input to format it, any syntax error surfaces with the position where the parser gave up, so you can jump straight to the problem instead of scanning the whole document.
Is my data sent anywhere?
No. Formatting happens entirely in your browser using JavaScript’s own JSON parser, and your data never leaves your machine. That makes this safe for API responses, config files, and payloads that contain secrets or other sensitive fields. A formatter that round-trips your JSON through a server can’t make that same guarantee.
A typical workflow: copy a compact response from an API, a log line, or a browser network tab, paste it here to make it readable, edit it, then minify it again before sending. The formatter accepts anything valid under the JSON spec, RFC 8259. See MDN’s JSON reference for how JavaScript itself parses and serializes it.