JSON Formatter

Cmd/Ctrl+Enter saves this input to history.

Advertisement

Paste JSON, get it pretty-printed with 2-space indentation instantly. There's no upload step and no server round-trip — parsing and formatting both happen in your browser.

Most "invalid JSON" errors trace back to one of three things: a trailing comma after the last item in an object or array, single-quoted strings or unquoted keys (both valid JavaScript object-literal shorthand, neither valid JSON), or a stray NaN/undefined value. None of those are formatter bugs — they're the JSON spec being stricter than JavaScript.

Frequently asked questions

Is this JSON formatter free to use?
Yes. It runs entirely in your browser — no signup, no rate limit, no data sent to a server.
Why does it say my JSON is invalid?
The three most common causes: a trailing comma after the last item, single-quoted strings or unquoted keys, or a NaN/undefined value. All four are valid JavaScript but not valid JSON.
Does formatting change my actual data?
No — it only re-indents. One exception: if your JSON has duplicate keys, the formatted output keeps only the last one, because parsing happens before formatting and duplicate keys are resolved at parse time, not a side effect of formatting.
Is my JSON uploaded anywhere?
No. Parsing and formatting happen locally in your browser tab — nothing is sent to a server.

Read the full guide for this tool →

Related tools & guides

Part of JSON Tools: Format, Validate, Diff, Convert, and Generate Types

Advertisement