JSON Validator
Check whether a piece of text is valid JSON and locate the exact character where it goes wrong.
Processed locally in your browser· Your data stays in your browser.
What is JSON Validator?
A JSON validator answers one question: does this text follow the JSON grammar? Typical mistakes are trailing commas, single quotes, unquoted keys, comments, missing commas or an unterminated string.
This validator uses a strict RFC 8259 parser. On success it summarises the document (root type, number of keys, nesting depth, size, counts of each value type) and warns about duplicate keys or integers too large for JavaScript. On failure it names the problem, the line and column, and prints the offending line with a caret.
How does it work?
- Paste your JSON into the input area (or open a file).
- Read the status banner: green for valid JSON, red for an error.
- For an error, follow the line and column and the caret excerpt to find the mistake, then fix and re-check live.
- When valid, use the statistics to sanity-check the structure, then format or minify it with the sibling tools.
Common use cases
- Checking a hand-edited configuration file before deploying it.
- Debugging an API client that reports “Unexpected token” without saying where.
- Verifying webhook or fixture payloads in a test suite.
- Teaching or learning what is and is not allowed in JSON.
Examples
Try this input in the tool above:
{"name": "Ada", "langs": ["en", "fr"], "meta": {"active": true, "score": 9.5}, "note": null}Root type: object Top-level keys: 4 Total keys: 6 Nesting depth: 2 Size: 92 B (92 bytes) Values: 2 objects · 1 arrays · 3 strings · 1 numbers · 1 booleans · 1 null
Privacy
JSON Validator runs entirely in your browser. The text or files you provide are processed on your device and are not uploaded, logged or stored on our servers.
Limitations
This checks syntax only. It does not validate against a JSON Schema, and it does not know whether your application accepts the fields.
Frequently asked questions
Why is my JSON with single quotes invalid?
The JSON standard only allows double-quoted strings and property names. Single quotes, unquoted keys, comments and trailing commas are JavaScript syntax, not JSON. JSON Repair can fix them automatically.
Is an empty object or a bare string valid JSON?
Yes. Since RFC 8259 any value, including "text", 42, true, null, [] or {}, is a valid JSON document. Only empty input is not.
What does the depth statistic mean?
It is the maximum nesting of objects and arrays: a scalar has depth 0, {} has depth 1, and {"a":{}} has depth 2. Very deep documents (over 2,000 levels) are refused for safety.
Related tools
JSON Formatter & Beautifier
Turn a minified or messy JSON document into readable, consistently indented text, with a precise error message if the JSON is invalid.
JSON & Data
JSON Repair
Paste almost-JSON from a log, a chat answer or a JavaScript snippet and get valid JSON back, with a clear report of every change.
JSON & Data
JSON Minifier
Compress a JSON document to one compact line and see how many bytes you saved.
JSON & Data
JSON Viewer
Explore a JSON document as an expandable tree instead of a wall of text, with a summary of its structure.
JSON & Data
JSONPath Finder
Type a JSONPath expression and instantly see the values it selects in your JSON, together with the normalized path of each match.
JSON & Data
YAML Validator
Check that a YAML file is valid and find the exact place where it breaks.
JSON & Data
XML Validator
Find out whether your XML is well-formed and see precisely where it breaks.
JSON & Data