JSON Validator
Paste JSON and find out instantly whether it parses. Pinpointed line and column for syntax errors, structure stats when it's valid. Runs in your browser.
Runs in your browser — nothing uploaded
Input
A fast, no-fluff JSON validator. Paste, see "Valid" or "Invalid" immediately, with a precise line-and-column callout for syntax errors and a structure summary when it parses. Useful for sanity-checking API payloads, configuration files, and any time you suspect a typo in a JSON string.
Private by design — your data never leaves your device
How to use it
No account, no upload — it all happens on your device.
1
Paste your JSON into the text area, or click 'Load sample' to see a working example.
2
If the JSON parses cleanly, you'll see a green 'Valid JSON' banner with structure stats below.
3
If it doesn't, the red banner shows the parser's message plus the line and column where it failed.
4
Click 'Jump to error' to highlight the problematic character right inside the text area.
What counts as valid JSON
The RFC 8259 rules in plain English.
- Six value types: object, array, string, number, boolean, and null. Nothing else — no dates, undefined, functions, or NaN/Infinity.
- Strings use double quotes.Single quotes aren't valid JSON, even though they're valid JavaScript.
- Property names must be quoted strings.
{name: "x"}is JS object notation — not JSON. - No trailing commas in objects or arrays. Many editors auto-insert them; strip before validating.
- No comments. JSONC and JSON5 add them, but plain JSON forbids both
//and/* */.
Common syntax errors
Read the parser message — it tells you almost everything.
| Error message | What it usually means | Fix |
|---|---|---|
| Unexpected token } in JSON at position N | Trailing comma before the closing brace, or a missing value. | Remove the trailing comma; add the missing value. |
| Unexpected token " in JSON at position N | A quote inside a string isn't escaped. | Escape it as \". |
| Unexpected end of JSON input | Truncated input — a closing brace or bracket is missing. | Verify all { and [ have a matching } and ]. |
| Unexpected token o in JSON at position 1 | You pasted a JavaScript literal (single quotes or unquoted keys), not JSON. | Use double quotes around all strings and property names. |
Beyond syntax: structure sanity checks
- Schema validation is a separate concern — tools like AJV (JSON Schema) or zod check shape and types against a contract. This validator only checks that the JSON is well-formed.
- Deeply nested objectsaren't invalid, but most consumers cap at ~64 levels. The structure panel shows max depth so you can spot a runaway object before it blows up downstream.
- Byte vs character count. If your transport has a size limit, the byte (UTF-8) count is what matters — non-ASCII characters can be 2–4 bytes each.
Frequently asked
How does this validator know my JSON is valid?
It runs your text through the same JSON parser the browser uses to load API responses. If the parser accepts it without throwing, the JSON is valid by the RFC 8259 spec. If it throws, the validator reports the parser's exact error message and pinpoints the line and column.
What are the most common reasons JSON fails to parse?
Trailing commas (`{"a": 1,}`), single quotes around strings, unquoted property names, unescaped newlines or quotes inside strings, comments, and stray BOM or non-ASCII characters at the start. JSON is strict on purpose — once you fix the syntax, the data side usually works.
Is the JSON I paste sent to a server?
No. Validation is one call to the browser's built-in `JSON.parse`. Nothing about your input — including the data itself — is uploaded, logged, or shared.