JSON Validator
Check any JSON payload for strict syntax validity and get a clear error message pointing to exactly what's wrong.
- Free
- No signup
- Private
Overview
Check any JSON payload for strict syntax validity and get a clear error message pointing to exactly what's wrong.
Benefits
- Clear, specific error messages
- Instant validation, no upload needed
- Useful before sending API payloads
- Free with no size restrictions for typical use
Use Cases
- Validating API request/response payloads
- Checking config files before deployment
- Debugging webhook data
- Verifying JSON before importing to a database
Users Also Use
How to Use
- Paste the JSON you want to validate.
- Click Validate to check syntax.
- Read the reported error message and line, fix it, then re-validate.
What does the JSON validator check?
It checks whether your text is valid JSON according to the standard (RFC 8259), using the same strict parser your browser uses for JSON.parse(). If the input is valid, you see "Valid JSON" in green. If not, you see the parser's error message in red, which usually says what was unexpected and where it was found. Unlike the JSON Formatter, the validator never repairs the input, so it tells you exactly whether a system that reads JSON will accept it.
The most common JSON errors
- Trailing comma after the last item: [1, 2, 3,]
- Single quotes instead of double quotes: {'name': 'Ada'}
- Keys without quotes: {name: "Ada"}
- Comments such as // note or /* note */, which JSON does not allow
- Values that exist in JavaScript but not in JSON: undefined, NaN, Infinity
- Missing comma between items, or a missing closing } or ]
- Unescaped line breaks or double quotes inside a string
Worked example
The input below fails because of the trailing comma after true. Remove the comma and it validates.
{
"id": 7,
"active": true,
}
Syntax validation versus schema validation
This tool checks syntax: whether the text can be parsed as JSON at all. It does not check whether the data has the right fields or types for your application, such as a required email field or a number in a given range. That is done with JSON Schema validation in your code or API framework.
Privacy
Validation runs in your browser. Nothing you paste is uploaded to our server.
FAQ
- What kind of errors does it catch?
- Common issues like trailing commas, missing quotes, unmatched brackets, and invalid data types are all reported.
- Does it tell me where the error is?
- Yes. The validator reports the position of the syntax error so you can jump straight to the problem.
- Is this the same as the JSON Formatter?
- They're related — the Formatter beautifies and auto-repairs JSON, while the Validator focuses on strict pass/fail syntax checking with error details.
- Why is my JSON invalid when it works in JavaScript?
- JavaScript object syntax is more relaxed. It allows single quotes, unquoted keys, trailing commas and comments, but JSON does not.
- What does "Unexpected token" mean?
- The parser found a character it did not expect at that point, often a quote, comma or bracket in the wrong place. Look at the position given in the message.
- Can the validator fix my JSON?
- No, it only reports errors. The JSON Formatter can repair trailing commas and missing brackets automatically.
- Is an empty object valid JSON?
- Yes. {} and [] are both valid JSON, and so is a single value such as "text", 42 or null.