JSON Validator
Updated Free mock REST & WebSocket APIs
Paste JSON to check whether it's valid. If it isn't, you'll see the exact line and column, the offending line highlighted and a plain-English explanation of what to fix.
Line 4, column 26: Trailing comma — remove the comma before ].
🔒 Runs in your browser — nothing you paste is uploaded.
How to validate JSON
- Paste your JSON into the box — it's checked as you type.
- A green ✓ means it's valid. Otherwise read the message and the highlighted line; the caret marks the exact character.
- Click Jump to error to put your cursor on the problem, fix it, and the result updates instantly.
What makes JSON valid
JSON is defined by RFC 8259 and is much stricter than JavaScript. A document is valid when:
- It contains exactly one top-level value — usually an object
{…}or array[…]. - Every property name is a double-quoted string, followed by a colon.
- Strings use double quotes and escape
",\and control characters (\n,\t,\uXXXX…). - Numbers have no leading zeros, no leading
+, no hex, and are neverNaNorInfinity. - The only literals are lowercase
true,falseandnull. - There are no trailing commas and no comments, and the file doesn't start with a byte order mark.
Why error messages differ between tools
Every browser's JSON.parse words errors differently — Chrome reports a position, Firefox a line and column, and Safari often no location at all. This validator uses its own strict parser, so you get the same precise line, column and suggestion everywhere. Note that duplicate keys are technically allowed by the spec, but most parsers silently keep only the last one — treat them as a bug.
Related tools
Frequently asked questions
Is my JSON sent to a server?
No. This tool runs entirely in your browser with JavaScript, so your JSON never leaves your device and isn't logged or stored. You can even use it offline once the page has loaded.
Does it validate against a JSON Schema?
No — it checks syntax only. Valid JSON can still be rejected by an API whose schema expects different fields or types.
Why is my JSON invalid when it works in JavaScript?
JavaScript object literals allow single quotes, unquoted keys, trailing commas, comments and undefined. JSON allows none of these.
Is there a size limit?
No fixed limit; it's bounded by your device's memory. Multi-megabyte files validate in well under a second on a modern laptop.
Your business here? Sponsor this tool from $16/week. See placements