Contact

Tools  /  JSON  /  JSON Validator

JSON Validator

Check whether JSON is valid and see what is inside it.

What this tool does

Paste or upload JSON and it's parsed, checked, and turned into a structure you can actually explore — not just a pass/fail message. Invalid JSON gets its error mapped to a line and column instead of a raw character offset. Valid JSON gets a collapsible tree, a stats breakdown, and two checks most validators skip entirely: duplicate keys and numbers that silently lose precision.

Catching what JSON.parse can't show you

By the time JSON.parse finishes, some information is already gone. If an object has the same key twice, the parser just keeps the last one and throws no error — so duplicate key detection here scans the raw text before parsing, and tells you which keys collided and that the later value silently won.

Similarly, a number like an ID or a Snowflake with 16 or more significant digits can lose precision the moment it becomes a JavaScript number, since JS represents all numbers as 64-bit floats. This tool flags any number long enough to be at risk, so you know to encode it as a string instead before it happens quietly.

Exploring the structure

Valid JSON renders as a collapsible tree, each node labelled with its type — object, array, string, number, boolean. A search box filters the tree live and auto-expands whatever matches. Every node has a one-click button to copy its JSON Path (like $.users[2].email), so you can hand that exact address to a script or a colleague instead of describing where a value lives.

Validating against a JSON Schema

An optional panel checks your JSON against a schema you supply — type, required, enum, minimum/maximum, minLength/ maxLength, pattern, and email format are all covered. It's a focused subset of JSON Schema built for everyday checks, not a full Draft 2020-12 implementation — for spec-complete validation with every keyword, a dedicated JSON Schema validator is the right tool.

Privacy

Everything — parsing, the duplicate-key scan, the tree, schema checking — runs in your browser. Nothing you paste is ever sent to a server, so there's no upload to skip because there isn't one.

Frequently asked questions

Is my JSON uploaded anywhere?
No. Validation, the duplicate-key and precision checks, the tree view and schema checking all run locally in your browser — nothing is sent to a server.
My JSON parses fine — why does it say I have duplicate keys?
JSON.parse silently keeps only the last value when a key appears twice, so the duplicate never surfaces as an error. This tool scans the raw text before parsing specifically to catch that, since it’s a real bug (the discarded value is gone) that standard parsing hides from you.
What does the large-number warning mean?
JavaScript stores all numbers as 64-bit floats, which can only represent integers exactly up to 253. A number with 16 or more significant digits — a large ID or a Snowflake, for example — can silently round to a different value once parsed. The fix is usually to encode it as a string in the JSON instead.
Does the schema check support full JSON Schema?
It covers the keywords people actually reach for day to day — type, required, enum, min/max for numbers and lengths, pattern, and email format. It’s not a complete Draft 2020-12 implementation; for spec-complete validation with every keyword, a dedicated JSON Schema validator is the better fit.
What is a JSON Path, and why would I copy one?
It’s the exact address of a value inside the structure, like $.users[2].email. Copying it from the tree gives you something precise to paste into a script, a query, or a message to a colleague, instead of describing where the value lives.
Can I save the validation results?
Yes — the Download report button saves a text file with the validation status, size before and after minifying, the object/array/string/number/boolean counts, and any duplicate-key or precision warnings.
Theme Accent