Free · No sign-up · Private
JSON Validator
Validate JSON and pinpoint syntax errors with a friendly message.
Quick answer
Paste JSON and the validator tells you at once whether it is valid. If it is not, it shows the parser’s error message, such as an unexpected token or an unterminated string, with its position, so you can jump straight to the mistake.
Valid JSON.
Step by step
How to use the JSON Validator
01
Paste your JSON.
02
See whether it is valid and any error details.
Worked examples
Valid and invalid examples
| Input | Valid? | Why |
|---|---|---|
| {"a": 1} | Yes | Keys and strings in double quotes |
| {'a': 1} | No | Single quotes are not allowed |
| {"a": 1,} | No | Trailing comma |
| [1, 2, 3] | Yes | Arrays are valid top-level values |
| {a: 1} | No | Keys must be quoted |
Good to know
Syntax versus schema
This checks that the text is well-formed JSON. It does not check that the data has the fields your application expects; that needs a JSON Schema validator.
Fixing errors quickly
Errors usually appear just after the real mistake. If the message points to a closing bracket, look at the line before it for a missing or extra comma.
JSON rules in brief
Keys and strings use double quotes; values are strings, numbers, true, false, null, objects or arrays; items are separated by commas with no comma after the last one; and the whole document is a single value. Numbers cannot have leading zeros or a trailing decimal point, and special values such as NaN or undefined are not allowed.
FAQ
Frequently asked questions
Is a single number valid JSON?
Yes. A string, number, true, false or null is valid JSON on its own.
Does it support JSON with comments?
No. Standard JSON has no comments.
More developer tools
Related tools
JSON Minifier
Minify JSON by removing all whitespace for the smallest possible size.
Open toolBase64 Encoder
Encode text into a Base64 string for safe transport.
Open toolBase64 Decoder
Decode a Base64 string back to readable text.
Open toolURL Encoder
Percent-encode text for safe use in a URL.
Open tool