JSON supports 7 types: string, number, boolean, null, array, object. Numbers are unquoted; strings always use double quotes. Single quotes, comments, undefined and NaN are not part of the standard (JSON5 only).
Common mistakes
How to fix
trailing , · 'quotes' · {key: 1}
Trailing comma after the last element, single quotes instead of double, unquoted keys. Standard JSON.parse rejects them. JSON5 allows all of this, but it's not a web standard — only for configs.
Format / minify
20–40%
{"a":1} → {\n "a": 1\n}
Formatted JSON — for development: easy to read and diff in git. Minified — for API responses and network traffic. Savings are typically 20–40% and much more on large payloads.
JSON vs YAML/XML
When which
API → JSON · config → YAML/TOML
JSON — best for APIs and service-to-service data: minimal, everyone parses it, no ambiguity. YAML/TOML — for configs (comments, readability). XML — legacy enterprise/SOAP, usually overkill for new work.
04
Frequently asked questions
Paste the JSON and it is laid out with indentation and line breaks, turning a one-line dump into a readable structure. The indent is your choice: two spaces, four, or a tab. The reverse works too — minifying strips every optional space and newline, which is what you want before sending the payload.
It means the parser met a character that cannot be there — most often a trailing comma, a single quote instead of a double one, an unquoted key or a comment, none of which JSON allows. The tool prints the line and column where parsing stopped, so you jump straight to the spot instead of scanning the file.
JSON is a text format, a JavaScript object is a structure in memory. They look alike, but JSON requires double-quoted keys and has no functions, no `undefined`, no comments and no trailing commas. Every valid JSON parses into an object; the reverse does not hold, since not every object survives serialisation intact.
Paste the text and pick the «Validate» mode — the check runs as you type. Valid input is confirmed with a green line, invalid input reports where it broke. The parser doing the work is the one built into your browser, so the verdict matches what any standard-conforming parser will say about the same document.
Format it first: indentation exposes the nesting, and from there the browser's own find works. The statistics section reports the key count and the maximum depth, which is usually enough to decide the next step — a document eight levels deep with thousands of keys is a job for code, not for reading.
No. Parsing, formatting and the statistics all run in your browser, and the contents of the field are never transmitted. That matters because JSON is usually an API response, complete with tokens, internal identifiers and personal data. Pasting one into a service that processes text server-side is a leak, not a convenience.