JSON Validator
Paste JSON and it is checked as you type against the strict RFC 8259 grammar: no comments, no trailing commas, no single quotes. When something is wrong you get the line, the column and what the parser expected there.
Why the error is on the next line: step through a parser
A JSON parser reads one character at a time and only knows what may come next. Step through these tiny documents and watch where it gives up.
{"id": 7 "ok": true}
key or "}""{" opens an object. Push it on the stack; next must be a key in double quotes or "}".
How it works
The checker walks your text once, character by character, the same way JSON.parse does. It keeps a small stack of what it is inside (an object, an array, a string) and what token may legally come next.
The first character that cannot come next is the error. That is why the reported position is sometimes a line after the real mistake: a missing comma is only noticed when the next value begins.
Duplicate keys are legal JSON syntax but RFC 8259 says names "SHOULD be unique", and most parsers silently keep the last value. They are shown as warnings, not errors.
That step-by-step view is the whole trick behind every "unexpected token" message you will ever see. ahaboo takes that same breaking-it-down feeling further, with clickable explainers you can move through at your own pace to see how real things work.
Everything above runs in JavaScript inside this tab. Your data is not uploaded. Inputs are remembered in this browser only so they survive a reload; you can switch that off on the privacy page.
Questions
Why does the error point to the line after my mistake?
A parser only knows something is wrong when it reads a character that cannot appear there. With a missing comma between two properties, the problem is detected at the start of the second property, which is usually on the next line.
Are comments or trailing commas allowed in JSON?
No. Standard JSON (RFC 8259, ECMA-404) allows neither. Formats such as JSONC (used by VS Code settings) and JSON5 add them, but JSON.parse and most APIs reject them.
Is my JSON uploaded anywhere?
No. Validation runs in JavaScript in your browser tab. Nothing is sent unless you press the optional "Explain & fix with AI" button, which sends only that snippet to generate an explanation.
What is the difference between a JSON validator and a JSON linter?
People use the terms interchangeably. Validation answers "is this legal JSON?"; linting adds style advice such as duplicate keys or suspicious values. This page does both.