
JSON validator
Paste JSON and find out at once whether it is valid. If it is not, you get the line, the column, the character it stopped at and a hint for the usual mistakes.
Runs in your browser. Pasted data never leaves it.
How to use it
- Paste your JSON into the left box, or drop a
.jsonfile onto it. It is checked as you type. - If it's invalid, you get the exact line and column, a pointer to the character, and a hint. Press the “Line, column” button to jump to it.
- Choose Text for the formatted result, Tree to expand and collapse it, or JSONPath to pull out values.
- Press Format to replace your text with the pretty version, or Minify to squeeze it onto one line. Copy or download the result.
Questions
How big a file can it open?
It parses in a background worker, so the page stays usable. A 50 MB file takes a few seconds and a lot of memory; files larger than about 3 MB are not shown in the text box but can be browsed in the Tree, queried with JSONPath and downloaded formatted. Your browser's memory is the limit.
Why does it say my JSON is invalid when my code accepts it?
JSON is stricter than JavaScript. Keys and strings need double quotes, no trailing commas, no comments, no undefined, NaN or Infinity, and no leading zeros on numbers. The error message names the rule that you broke.
Which JSONPath syntax is supported?
$ root, .key and ['key'], [0] and [-1], [*], .. recursive descent, unions [0,2], slices [1:5:2], and filters like [?(@.price < 10 && @.stock)] with == != < > =~ and the functions length(), count(), match() and search(). It follows the common Goessner syntax with the RFC 9535 filter forms.
Are big numbers kept exact?
JSON numbers are read as JavaScript numbers, which are exact only up to 9,007,199,254,740,991 (253−1). Longer integers such as 12345678901234567890 are rounded when the file is parsed, so the formatted output can differ in the last digits. Keep IDs that large as strings.
Does it keep key order?
Yes, except that JavaScript puts integer-like keys (such as "2" and "10") first in numeric order. Turn on “Sort keys” if you want alphabetical order.
Is what I paste or test sent anywhere?
No. This page works entirely inside your browser, and pasted data never leaves your device. It makes no network requests while you use it, and the page also tells your browser to block them (a Content-Security-Policy with connect-src 'none'), so even a bug could not send your data out. To check it yourself, open your browser's developer tools, go to the Network tab, and use the tool: nothing will appear. There is no account, no analytics and no logging.
