About this tool
A JSON formatter takes a flattened, hard-to-read JSON string and re-indents it into a clear tree, or does the reverse and minifies it to the smallest size. It is also a strict validator: when parsing fails it points to the line and column of the problem, helping you quickly find the usual culprits — trailing commas, mismatched quotes, unclosed brackets.
It makes API responses, config files and log fragments human-readable, and is one of the handiest tools for debugging endpoints and tracking down data issues.
How to use
- Paste the JSON into the input box — it can be single-line minified or already indented.
- Click "Format / Beautify" and the tool re-indents it with standard spacing and expands nested levels.
- If you need the smallest size, click "Minify" to strip all extra whitespace into one compact line.
- If validation fails, the error message shows the line and column of the fault so you can fix the syntax.
- Once it is clean, click "Copy" to take the result back into your code or config file.
When to use it
- Lay out a long JSON response from a backend API to see its field structure clearly.
- Validate a hand-written config file and locate a missing comma or a stray trailing comma.
- Minify JSON to a single line before embedding it, to cut its size.
- Normalise the format of two payloads first, then diff them by eye or with a tool.
- Pull a JSON fragment out of a log and confirm whether it is valid and how it is structured.
FAQ
Is my JSON uploaded or saved?
No. Formatting, minifying and validating all happen locally in the browser; nothing is sent to a server or retained.
Why does it say my JSON is invalid?
The usual causes are a trailing comma, keys not wrapped in double quotes, or an unclosed quote or bracket. The error message gives a line and column — check that spot.
Does it accept comments or single quotes?
Standard JSON does not allow comments and requires double quotes. JSON5-style input like that is treated as invalid; convert it to standard JSON first.
Do beautify and minify change the data itself?
No. They only adjust whitespace and indentation; the keys, values, order and types stay the same, so the meaning is identical.