Reading API responses
Turn a single long line from an API or log into readable, indented JSON in one click.
Paste messy JSON below and get clean, indented output in one click. This free JSON formatter online also validates your data, points to the exact line and column of any error, minifies for production and shows a collapsible tree you can browse.
Numbers and text are kept exactly as typed. Strict JSON only: no comments, trailing commas or single quotes.
Valid JSON appears here as a tree you can open and close.
Turn messy or minified JSON into readable, properly indented data, check syntax errors, and compact it again when you need a smaller payload.
A JSON formatter turns compact or messy JSON into clean, readable text with consistent indentation. A JSON beautifier or pretty printer does the same basic job, while a validator checks whether the JSON syntax is valid.
Use Beautify or pretty print when you are reading an API response, configuration file or log. Use Minify when you want a compact payload. If the JSON is invalid, this tool points you to the problem by line and column.
Turn a single long line from an API or log into readable, indented JSON in one click.
Find missing commas, extra brackets and bad quotes by line and column before they break your app.
Minify config and payloads to remove extra bytes, or sort keys to make files easy to compare.
| Example | Problem | Fix |
|---|---|---|
| {"a":1,} | Trailing comma | Delete the comma after the last item. |
| {'a':1} | Single quotes | Use double quotes around keys and text. |
| {a:1} | Unquoted key | Write the key as "a". |
| {"a":1 "b":2} | Missing comma | Add a comma between the two items. |
| {"n":007} | Leading zero | Write 7, or "007" as text. |
| {"a":1} // note | Comment | JSON has no comments, so remove them. |
Formatting happens locally in your browser. The JSON you paste or upload is not sent to a server or saved.
The formatter accepts up to 5 million characters and 400 levels of nesting. It checks strict JSON, so comments and trailing commas are reported as errors. The tree view shows the first 500 items of a long list.
Dozens more free, no-API-key tools live on the homepage.
Count words, characters and reading time as you type.
Open toolCreate a downloadable QR code from any link or text.
Open toolConvert length, weight, and more between units instantly.
Open toolFind sale prices and savings in a couple of taps.
Open toolNo matching question.
Tell other visitors what you thought of this tool.