AnyFormat

00 Utility

JSON Validator

Is it valid? If not, exactly where and why.

01Input
02Output
03Options 1
  • No upload The conversion runs in this tab. Your file never travels — not to us, and not to the advertising.
  • No sign-up, no email, no daily cap There is no account system to sign up to.
  • No size limit we invented Only your device's memory — about ~2 GB on a desktop browser, ~400 MB on a phone.
  • Turn your Wi-Fi off and convert anyway The conversion needs nothing but this page. Ads will not load without a connection; your file will still convert. That is the whole claim, and it takes five seconds to check.

Paste JSON and find out whether a strict parser will accept it. This page answers one question — is it valid, and if not, where — without reformatting your document in the process.

Strict on purpose

This validator accepts exactly what RFC 8259 allows and nothing more. Trailing commas, single-quoted strings, unquoted keys, comments, NaN, Infinity and hexadecimal numbers are all rejected. Every one of them is legal JavaScript, which is why they turn up so often in files people believe are JSON.

Being strict is the point: a permissive validator that accepts your file tells you nothing about whether the service you are sending it to will.

What counts as valid at the top level

A JSON document may be an object, an array, a string, a number, true, false or null. A bare "hello" is valid JSON. Two objects one after another are not — that is JSON Lines, a different format, and it needs to be split by line before each part will validate.

Duplicate keys

{"a": 1, "a": 2} is valid JSON by the specification, which does not forbid duplicate names. Almost every parser silently keeps the last one. If your document has duplicates, it will validate here and still behave unpredictably in the wild — the specification calls the behaviour undefined for good reason.

Other names for this

Also searched as “check json”, “json syntax checker”, “is my json valid”.

Questions

It says my file is invalid but my editor opens it fine.
Your editor is probably parsing it as JavaScript or JSON5, which allow comments and trailing commas. Strict JSON does not.
Can it validate against a JSON Schema?
No — this checks syntax only. Validating a document against a JSON Schema is a different job: it needs the schema as a second input and answers a different question, which is whether the data is correct rather than whether it is well-formed.
Does my text leave the browser?
No. Everything runs as JavaScript in this tab — there is no server involved and no request is made. Open the Network panel and watch, or turn your Wi-Fi off and keep using the tool.