Is this JSON valid?
Paste JSON or JSON-LD. See at once whether it is valid; if it is not, see the line and the column of the mistake and what to change. Format it with two spaces, four spaces or tabs, or minify it, and copy or download the result.
A JSON-LD block copied with its script tag works too. Nothing you paste leaves your browser.
What it does
- Validates with the browser's own JSON reader. Whether the text is valid is decided by JSON.parse, the reader built into every browser, which follows the JSON standard (RFC 8259). Nothing you paste is ever run as code.
- Points to the mistake. A second, careful pass finds the exact line and column of the first mistake, shows that piece of the line with a mark under it, and says in plain words what is wrong and how to fix it: a comma too many or too few, single or curly quotes, a name without quotes, a comment, a bracket left open.
- Formats without changing values. Numbers and escapes stay exactly as you wrote them, so 1.0 stays 1.0 and a long ID number keeps every digit, which a plain JSON.stringify would not promise.
- Notes what JSON allows but you may not want. A name used twice in the same object: JSON.parse keeps the last one, so the first is lost without warning.
- Knows JSON-LD. When the text has an @context, the result lists its @type values and links to the schema checker, which reads the properties Google requires and recommends.
What it does not do
It does not check what the data means. Valid JSON can still carry wrong values or misspelt names. For structured data on a website, the schema checker goes further.
It does not accept relaxed JSON. Comments, trailing commas and single quotes work in some tools and file formats (JSON5, JavaScript objects), but not in JSON, so they are reported as mistakes.
It stops at the first mistake. Fix it and the next one, if there is one, shows at once.
Questions
Why is a comma after the last item an error?
RFC 8259 puts a comma only between two values, so a comma before } or ] breaks the JSON. JavaScript allows it, which is why it is such a common mistake.
My quotes look right. Why are they wrong?
Word processors and some chat apps turn " into curly quotes (“ and ”). JSON needs the plain straight double quote. The page names the curly ones when it finds them.
Is my JSON sent anywhere?
No. It is read and formatted in your browser and never leaves your device.
Can I paste the script tag around JSON-LD?
Yes. A single <script type="application/ld+json"> block is read without its tags, and lines and columns still count from the text you pasted.