Formatted output will appear hereFormatted output will appear herePaste minified or messy JSON and get it back readable, with syntax errors pinpointed as you type. Formatting, validating, and minifying all happen in your browser.
How do I fix invalid JSON?
Paste it in and the tool reports the first syntax error with its position. The usual culprits are trailing commas after the last item, single quotes instead of double quotes, unquoted keys, and comments — none of which are valid JSON.
What is the difference between formatting and minifying?
Formatting adds indentation and line breaks so a human can read the structure. Minifying strips every optional space and newline to make the payload as small as possible for transmission. The data is identical either way.
Can I use comments in JSON?
Not in standard JSON — the specification has no comment syntax, so // and /* */ will fail validation. Some parsers accept them as an extension (often called JSONC), but anything strictly following the spec will reject them.
Is my JSON sent to a server?
No. Parsing and formatting use your browser's built-in JSON functions. Nothing leaves your machine, which matters when the JSON you are debugging contains API responses or customer data.
Why does my JSON fail with a trailing comma?
JSON does not allow a comma after the final element of an array or object, even though JavaScript does. It is the single most common cause of a parse failure when copying code into a JSON file.
What is the largest file I can format?
There is no hard limit, but very large documents — tens of megabytes — may slow your browser down, since the whole structure is held in memory while it is parsed.
Every tool runs in your browser. No login, nothing uploaded. See all tools · What we build for clients