Reading API responses
Paste a minified response and see its structure at a glance instead of one long line.
Paste JSON and it is checked and formatted as you type. Pick 2 spaces, 4 spaces, a tab or minified output, sort the keys if you like, and get the exact line and column when something is wrong. Your data is never uploaded.
What JSON is, why it breaks and how to fix it quickly.
A JSON formatter turns JSON text into a tidy, indented layout that people can read, or squeezes it into one compact line for sending. A validator checks that the text really is JSON and tells you where it is not.
This tool does both at once. It reads your JSON with a strict parser, shows the result in the style you choose and gives the line and column of any mistake, so you can fix it without hunting through the text.
Paste a minified response and see its structure at a glance instead of one long line.
Check package, settings and data files for typos before an app fails to load them.
Minify JSON to strip whitespace before you embed it in a page, a request or a test.
JSON has a small set of rules. Text is wrapped in double quotes, including every key. Values can be strings, numbers, true, false, null, arrays or objects. Items are separated by commas, with no comma after the last one, and comments are not allowed.
Most errors come from a few habits carried over from JavaScript or other formats: single quotes, unquoted keys, trailing commas, comments and values such as undefined or NaN. The validator names the problem it finds and the line and column where it happens.
Formatting here is careful about your data. Numbers and strings are copied exactly as written, so a long ID like 12345678901234567890 does not lose digits and 1.0 does not turn into 1. Only whitespace changes, plus key order if you turn on Sort keys. If the same key appears twice in one object, the tool warns you, because most parsers keep only the last value.
Your JSON is parsed and formatted in your browser by JavaScript on this page. It is not uploaded, stored or logged, and downloaded files are created on your device.
Only standard JSON is accepted. Comments, trailing commas, single quotes and NaN are reported as errors, and the tool does not repair them for you. Very large files, over about 10 MB, are not processed.
Paste your JSON into the input box. It is formatted straight away with the indentation you pick: 2 spaces, 4 spaces or a tab. Then copy the result or download it as a .json file.
The tool reads your text with a strict JSON parser. If something is wrong, it shows the line and column of the problem with a short explanation, and a button takes you to that spot in the input.
Beautify adds line breaks and indentation so JSON is easy to read. Minify removes all optional whitespace to make the text as small as possible. The data is the same either way.
The usual causes are a trailing comma, single quotes instead of double quotes, keys without quotes, a missing comma between items, or comments. Standard JSON allows none of these, and the error message points to the exact place.
No. Strings and numbers are kept exactly as you wrote them, including very large numbers and values like 1.0 or 1e3. Only whitespace changes, plus the order of keys if you turn on Sort keys.
Not in standard JSON. Formats such as JSON5 and JSONC allow them, but this validator follows the standard, so it reports comments and trailing commas as errors.
No. Formatting and validation run in your browser, and your JSON never leaves your device. That makes it safe for API responses and config files that you would rather keep private.
Up to about 10 MB of text. Speed depends on your device, so very large files can take a moment on a phone. Everything is processed in your browser memory.
The homepage features dozens more free tools that don't require an API key.
No matching question.
Share your thoughts on this tool with other visitors.