“We noticed you may be using an ad blocker. SEO Site Checker relies on ads to keep our SEO tools free. Please consider disabling your ad blocker to support us - thank you!”“We noticed you may be using an ad blocker. SEO Site Checker relies on ads to keep our SEO tools free. Please consider disabling your ad blocker to support us - thank you!”
Paste JSON or load it from a web address and see at once whether it is valid. Invalid JSON shows the parser's message with the line number. Free, nothing to install.
Result
What Is a JSON Validator?
Quick answer: A JSON validator checks that text follows the JSON grammar so a program can read it. Paste your data above, press Validate JSON, and the page says JSON is valid or JSON is invalid. Validate your JSON now.
The check runs in your browser, so nothing you paste is sent anywhere, and there is no account to make. Use this JSON validator when an API response, webhook payload or config file stops loading and the log gives no hint where. It checks syntax, not meaning, so no JSON Schema is applied.
How to Validate JSON Online
Add your JSON. Type or paste it under Enter or paste JSON, use Load from URL with a public address, or pick a .json file. Files may be UTF-8, UTF-16 or Windows-1252.
Press Validate JSON. The browser's own JSON.parse gives the verdict, so there is no waiting on a server.
Read the panel. JSON is valid unlocks Save as TXT and Copy to Clipboard. JSON is invalid shows the parser message instead.
Fix and repeat. Correct the named line and check again.
Load from URL goes through our server and accepts public addresses only, so http://127.0.0.1/ gets That address is not allowed. The fetch stops at 3 MB and each visitor gets 20 loads a minute. Point it at an HTML page and the page source lands in the editor and reads as invalid, so check the address returns JSON. An empty box answers JSON is invalid with Paste or type some JSON first.
How to Read a JSON Parse Error
Take the usual culprit, a trailing comma in {"a":1,"b":2,}. The JSON error checker prints Parse error on line 1:, the offending line, a row of dashes with a caret under the problem, then Expecting 'STRING', got '}'. You get a line and a pointer, not a column.
Expecting lists what the grammar allowed, and got is what the parser found. In an array the same mistake lists every value the grammar would have accepted before got ']'. The echoed row may lose its line breaks, so trust the line number.
The quirk: for single quotes, unquoted keys, comments, NaN, undefined, +1, 0x1F, 01 and raw tabs the message ends in got 'undefined'. The caret points at or just before the problem; for 01 and 0x1F it marks the start of the number.
On multi-line input the reported line is the line of the last good token. A missing comma at the end of line 3 is reported on line 3, though the bad token starts on line 4. On a long response, paste a smaller slice into the box and halve it until the error shows up.
Rule of thumb: double quotes only, string keys, no comments, no trailing commas, and escaped control characters, so write \t instead of a real tab. Any top-level value is valid, because RFC 8259 dropped the old object-or-array requirement.
A byte order mark pasted as text gives an Unexpected token error on an invisible character, while a BOM file loaded with the file button is read correctly. JSON5 and JSONC are different formats, so a tsconfig with comments fails here.
Valid JSON That Can Still Bite You
Two cases pass the grammar and still get a warning under the green result.
Duplicate keys: {"a":1,"a":2} is accepted and the warning names the key. Many parsers keep the last value, though the spec leaves it open, so two systems can disagree.
Big numbers: 12345678901234567890 is valid, but JavaScript reads every number as a double precision floating point value, which keeps about 15 to 17 significant digits, so the tail of a long ID changes. Send IDs that large as strings.
What This Validator Does Not Check
This json validator checks syntax only, with no required fields or type rules. For JSON-LD, validate the syntax here, then run the markup through our Schema Markup Validator.
Pasted text and files stay in your browser; only Load from URL sends the address, not your text, to our server. We do not cut off pasted text, but a 3.8 MB array of 60,000 objects took about 8.6 seconds on one run and 5.2 on another in headless tests. The valid or invalid verdict comes from the same parser your own code calls, JSON.parse; the line and Expecting hints come from the editor's own parser.
Next Steps After Your JSON Validates
Our guide on how to format JSON online covers layout. Once the page says valid, these are the usual next stops.
Frequently Asked Questions (FAQs) is a list of common questions and answers provided to quickly address common concerns or inquiries.
How do I validate JSON online?
Paste it, press Validate JSON, and read the verdict. If you only have a link, use Load from URL, or pick a .json file saved with that extension. On an invalid result you get the parser message and line number, and an empty box answers Paste or type some JSON first.
Why is my JSON invalid?
The usual causes are a trailing comma, single quotes, unquoted keys, comments or a missing bracket. The error panel shows the line and an Expecting list naming what the grammar wanted at that spot. Look one token before the caret, because the parser often fails just after the real mistake.
Does this validator check JSON Schema?
No. It checks syntax only, meaning whether the text is well formed JSON. It will not enforce required fields, value types or allowed ranges. A document can be valid here and still break your API, so use a schema validator when you need to check structure.
Is my JSON uploaded to your server?
Pasted text and files are checked in your browser, and in our test no request left the page when we pressed Validate JSON. The one exception is Load from URL, which sends the address, not your text, to our server so it can fetch the file.
Can JSON have comments or a trailing comma?
No. Both make the document invalid, and the error names the spot, for example Expecting 'STRING', got '}' after a trailing comma. Strip the comments and the last comma before the data reaches an API or loader that expects plain JSON.
What is the maximum JSON size I can validate?
We set no fixed limit on pasted text. A 3.8 MB array of 60,000 objects validated in about 8.6 seconds in our test, so very large files can feel slow on weaker devices. Load from URL stops at 3 MB, so use the file button for bigger documents.
Is a plain number or string valid JSON?
Yes. In our tests, 42 and a quoted string both came back as valid. The current standard, RFC 8259, allows any JSON value at the top level, so the document does not have to be an object or an array. Older specifications were stricter, which is where the myth comes from.
We use cookies to personalize content and ads, to provide social media features and to analyze our traffic. You consent to our cookies if you continue to use our website.
Install SEO Site CheckerFree SEO tools - always in your pocket.