Developer Tools
JSON Validator
Validate JSON in your browser. See the line, column, and likely cause of every syntax error, with hints for trailing commas, smart quotes, and unquoted keys.
Result
What this validator checks (and what counts as invalid JSON)
Accepted by JSON
- Objects, arrays, strings, numbers, true, false, and null.
- Strings with double quotes and standard escapes (\\n, \\t, \\r, \\b, \\f, \\", \\\\, \\/, \\uXXXX).
- Numbers in plain decimal or scientific notation (1e6, -2.5e-3).
- Unicode inside strings, both raw code points and \\uXXXX escapes (with surrogate pairs for characters above U+FFFF).
- A single top-level value. Most documents are an object or an array.
Rejected (common JS / JSON5 mistakes)
- Single quotes around strings or keys.
- Unquoted property names (key: value).
- Trailing commas after the last property or array element.
- Comments (// line, /* block */) or shebangs (#! ...).
- JavaScript / Python literals: undefined, NaN, Infinity, True, False, None.
- Hex (0x1F), octal (0o17), binary (0b101), or numbers with a leading + or leading dot (.5).
- Smart / curly quotes pasted from word processors, a UTF-8 BOM (U+FEFF), or stray control characters inside strings.
- More than one JSON value back-to-back (use an array or NDJSON instead).
How to use
- Paste your JSON into the input box on the left. The validator runs in your browser as you type.
- Read the green Valid banner or the red Invalid banner above the result panel. The red banner names the line and column of the first failure.
- If invalid, open the Error location panel for a code snippet with a caret pointing at the bad character, and check the Likely cause hint for a plain-English explanation.
- If valid, scroll down to Document breakdown to see node counts, max depth, deepest path, and input / minified / pretty sizes in chars and bytes.
- Click Copy pretty JSON to copy a 2-space formatted copy, or Replace with pretty-printed to swap the input with the cleaned version.
- Try Load valid sample or Load broken sample to see the validator in action on a known-good and a known-broken document.
About this tool
JSON Validator is a single-purpose strict JSON checker. Paste any JSON document on the left and the tool tells you in plain English whether it is valid per the JSON specification (RFC 8259 / ECMA-404). When the input is invalid it shows the exact line, column, and 0-based byte index of the failure, draws a code snippet with the surrounding lines, marks the bad character with a caret pointer, and adds a Likely cause hint that explains the most common cause in plain English. The hint engine recognises trailing commas before } and ], smart or curly quotes pasted from word processors, single quotes used as string delimiters, unquoted object keys, JavaScript and Python literals (undefined, NaN, Infinity, True, False, None), line and block comments (// and /* ... */), hex / octal / binary number literals (0x1F, 0o17, 0b101), numbers with a leading + or a leading dot, control characters inside strings, missing commas between properties or array elements, unclosed brackets and unterminated strings, a UTF-8 byte order mark at the start of input, and extra non-whitespace content after a complete value. When the input parses, the tool reports a document breakdown: root type, max depth, total nodes, counts and percentages for objects, arrays, strings, numbers, booleans, and nulls, total and unique key counts, the deepest dotted key path in the tree, the largest array, and the largest object. It also shows three sizes side by side (input, minified, and 2-space pretty) in both characters and UTF-8 bytes, so you can see what you save by minifying or what you add by pretty-printing. A Copy pretty JSON button gives you a 2-space-indented copy of the parsed document, and Replace with pretty-printed swaps the input box for the formatted output for a quick clean-up pass. Everything runs locally in the browser via JSON.parse; nothing is uploaded, logged, or sent to a server.
Free to use. Works in your browser. No signup, no login.
Related tools
You may also like
JSON Formatter
Format, minify, and validate JSON in your browser.
Open tool
DeveloperJSON Minifier
Compact JSON with live byte savings and a JS literal copy.
Open tool
DeveloperJSON Diff Checker
Structural compare with paths for added, removed, and changed values.
Open tool
DeveloperJSON Repair
Auto-fix broken JSON: trailing commas, single quotes, unquoted keys, comments, smart quotes, and NDJSON.
Open tool
DeveloperJSON Schema Validator
Validate JSON against a Draft 7 or 2020-12 schema with pointer-tagged errors.
Open tool
DeveloperJSON Escape / Unescape
Escape text into a JSON string literal or decode an escaped JSON string back to plain text.
Open tool