JSON Validator

Validate JSON as you type with exact line and column errors, a caret pointing at the broken character, and warnings for duplicate keys and unsafe numbers that other validators ignore. Runs entirely in your browser.

0 chars · 0 bytes
Waiting for JSON

Tip: press Ctrl+Enter (Cmd+Enter on Mac) in the editor to format. Drop a .json file anywhere on the editor to open it.

Loading...

Private by design: your JSON never leaves the browser. No upload, no server, no logging.

Validation that goes beyond "parse failed"

Native parser errors are notoriously unhelpful: a position offset with no context, or no position at all. This validator scans your document itself and translates every failure into the vocabulary of the mistake that caused it: trailing comma before a closing brace, single-quoted property name, unquoted key, raw line break inside a string, NaN where a value should be. Each message carries the exact line and column plus an excerpt with a caret, so you fix the document instead of hunting through it.

A green result also means more here than elsewhere. Because the underlying engine reads the token stream instead of converting your document to JavaScript values, it can tell you when syntactically valid JSON will still betray you downstream: duplicate keys that different parsers resolve differently, and integers past the JavaScript-safe range that JSON.parse() would silently round. Both appear as warnings with positions, and neither is ever changed without your explicit say-so.

The mistakes that break most documents

Nearly every invalid JSON document fails for one of a handful of reasons: trailing commas and comments left over from JavaScript or JSONC config files, single quotes or bare keys from hand-written objects, smart quotes introduced by Word or Slack, and NaN or Infinity emitted by a numeric pipeline. LLM output adds truncated documents and stray prose around the payload. The Fix common mistakes button repairs the mechanical ones with a full preview and Undo, and the validator pinpoints whatever remains.

JSON validation FAQ

How do I find the exact error in my JSON?

Paste the document above and the validator reports the first error with its line and column, an excerpt of the offending line with a caret under the broken character, and a plain-English explanation instead of the cryptic native parser message. The Go to error button moves your cursor straight to the spot. Fix it, and validation reruns as you type until the status chip turns green.

What does an "unexpected token" error actually mean?

It means the parser hit a character it did not expect at that position. The real cause is usually one character earlier: a missing comma between items, a missing closing quote on the previous string, or a stray trailing comma. If the token is a single quote, a letter starting a bare word, or a slash starting a comment, the document is written in a JavaScript or JSON5 dialect, and the Fix common mistakes button can convert it to strict JSON with a preview of every change.

Can JSON be valid but still cause problems?

Yes, and a good validator should tell you about it. Two cases matter in practice: duplicate object keys, which RFC 8259 says should be unique because parsers disagree about which value wins, and integers beyond 9007199254740991, which JavaScript silently rounds. Both are reported here as warnings with exact positions while the document still counts as valid JSON, because both are legal syntax with real interoperability consequences.

Is JSON validated locally or on a server?

Locally. The validator is JavaScript running in your own browser tab: nothing is uploaded, stored or logged, and the page makes no network requests with your data. You can disconnect from the internet and it keeps working. Paste production API responses, webhook payloads or config files with secrets in them without them ever leaving your machine.

What is the difference between validating syntax and validating a schema?

Syntax validation, which this page does, answers whether the document is well-formed JSON at all. Schema validation answers whether a well-formed document matches a contract: required fields, types, ranges and formats, usually expressed as JSON Schema. Most debugging starts with syntax, because a document that does not parse never reaches schema checks. If you need structured-data validation for SEO markup, our Schema Validator tool covers that separately.