This formatter takes dense or minified JSON and pretty-prints it into cleanly indented output you can actually read. Paste into the left editor and the formatted version appears in the right editor immediately; the toolbar dropdown switches the indentation between 2 spaces, 4 spaces, and tabs, re-rendering the output the moment you change it.
The parser is deliberately forgiving. It accepts relaxed JSON5-style input — single-quoted strings, trailing commas, and comments — the kind of almost-JSON found in hand-edited config files and copied code snippets, and it always emits strict, standards-compliant JSON. Typical jobs include making an API response readable before debugging, tidying a configuration file, expanding a one-line log payload, and preparing JSON for a code review.
JSON frequently contains the most sensitive data a developer handles — API responses, tokens, customer records — and none of it should have to transit a third-party server just to be re-indented. Here the parsing and printing execute as local JavaScript inside your own tab, so the site has no way to observe what you format.
No. Keys are emitted in exactly the order they appear in your input, and no values are altered, added, or removed. The only changes are whitespace and the normalization of relaxed syntax into strict JSON.
It reads the relaxed JSON5 dialect, which permits comments, single quotes, and trailing commas — conveniences that strict JSON forbids but that show up constantly in real-world files. Whatever it accepts, it always writes back out as standard JSON that any parser will take.
Two spaces is the common convention in the JavaScript ecosystem, four spaces reads more clearly in deeply nested documents, and tabs keep the file smaller while letting every editor display them at whatever width the reader prefers. The choice is purely cosmetic — all three produce equivalent JSON.