JSON formatter & validator
Paste JSON to check it's valid — most browsers pinpoint errors by line and column — then format it for reading or minify it for shipping.
Reading someone else's JSON without losing your mind
Most JSON you meet in real work was never meant for human eyes: an API response arrives as one enormous line, a config file has been minified by a build step, a log entry has a payload squashed into it. The habit that pays off is simple — paste first, read second. Once it is formatted, the indentation shows you the shape of the data before you read a single value: how deep the nesting goes, which parts are arrays of repeated things and which are one-off settings. That structural glance often answers the question on its own, because the field you were hunting for turns out to sit inside a different object than you assumed. Nothing about the data changes when you format it — only the whitespace does — so the formatted copy is safe to paste straight back into whatever needed it.
When the JSON is valid but still looks wrong
Two things regularly confuse people even after a successful parse. The first is JSON inside JSON: a string field whose value is itself a chunk of escaped JSON, full of backslash-and-quote pairs. That is not corruption — some system stored a document as text inside another document. Copy the inner string out and format it on its own to read it. The second is big numbers. JSON itself allows integers of any size, but JavaScript stores numbers as 64-bit floats, so an ID longer than about fifteen or sixteen digits can silently change its last digits when parsed. If you format a payload and a long numeric ID comes out subtly different, that is why — and it is the reason well-designed APIs send long IDs as strings.
What Minify is actually for
Minified JSON is for machines and tight spaces: a payload pasted into a curl command, a value squeezed into an environment variable or a single database column, a response you want as small as possible on the wire. Formatting and minifying are perfect mirrors of each other — you can bounce the same data between them all day and nothing but the whitespace ever changes. A tidy workflow that uses both: format to read and edit, minify to ship. And if your data started life as a spreadsheet rather than as JSON at all, the CSV to JSON converter turns rows into an array of objects — pasting its result in here is a quick way to confirm it parses before your code ever sees it.
The usual suspects when JSON won't parse
JSON is stricter than JavaScript: keys must be in double quotes, no trailing comma after the last item, no comments, and no single quotes. The validator here runs while you type and tells you the line and column of the first problem it hits (Safari reports the error without a position — that is the browser, not the JSON).
What's the difference between Format and Minify?
Both produce the exact same data. Format adds indentation and line breaks so humans can read it; Minify strips every unnecessary character so it's as small as possible for transfer or storage.
Is my JSON sent anywhere?
No — this runs entirely in your browser with plain JavaScript. Nothing is uploaded, which also makes this safe for data you'd rather not paste into a random website.
