Pretty-print or minify JSON with your choice of indentation and optional key sorting.
JSON Validator
Validate JSON and pinpoint errors by line and column — including duplicate keys that most parsers ignore.
Runs in your browser — nothing you enter is sent to our servers
How it works
The validator reads your text character by character against the JSON specification (RFC 8259). At the first problem it stops and reports where — line, column and the line itself with a marker — and why, in plain English: a missing comma, single quotes, a trailing comma, a comment, a leading zero and so on.
For valid JSON it reports the structure (objects, arrays, keys, value types and nesting depth) and lists any duplicate keys.
Example
The pre-filled example contains two problems. The trailing comma after "version": 2 is an error, reported on line 7. Remove it and the JSON becomes valid — but the validator still warns that name appears twice in the root object, so "ToolTarvern" would be silently replaced by "Duplicate key!".
Frequently asked questions
How is this different from the JSON formatter?
The formatter reshapes valid JSON. The validator focuses on finding problems: it uses a strict parser that reports the exact line and column of an error with a plain-English explanation, shows the offending line, and warns about duplicate keys — which most JSON parsers accept silently.
Why are duplicate keys a problem?
The JSON standard says object keys should be unique. When they aren’t, most parsers keep only the last value without telling you, so data can silently disappear. The validator lists every duplicate with its path and line number.
Does it support comments or trailing commas?
No — standard JSON doesn’t allow them, so the validator reports them as errors. Some tools accept “JSON with comments” (JSONC) or JSON5, but APIs usually expect strict JSON.
Related tools
Minify JSON without changing numbers or strings, strip comments and trailing commas, and see the bytes saved.
Decode a JSON Web Token, check its claims and expiry, flag risks, and verify HS, RS, PS, ES or EdDSA signatures.
Generate random v4 or time-ordered v7 UUIDs in bulk, in the format you need.
Related guides
JSON, Base64, URL encoding and HTML entities explained
What JSON, Base64, percent-encoding, HTML entities, UUIDs and Unix timestamps are for — and the common mistakes developers make with each.
A practical regex guide for JavaScript developers
The regular expression syntax you'll actually use in JavaScript — character classes, groups, lookarounds, flags and replacements — with examples you can try.
CSS colour formats explained: HEX, RGB, HSL, HWB and OKLCH
What each CSS colour format means, when to use it, why OKLCH is useful for palettes, and how to check colour contrast for accessibility.