JSON Validator
Validate JSON input, find syntax errors, pretty-print readable JSON, or minify JSON for compact output. Useful for API debugging, configuration files, and developer workflows.
JSON Validator tool
Standard JSON only. Trailing commas, comments, single-quoted keys, NaN, and undefined are not valid JSON.
| Metric | Value |
|---|
How JSON validation works
JSON validation checks whether the input follows the official JSON syntax rules. This tool parses your input as JSON, then returns either a valid formatted result or a parsing error.
- Validate: checks whether the JSON can be parsed
- Pretty print: adds indentation for easier reading
- Minify: removes unnecessary whitespace for compact output
- Common mistakes: trailing commas, comments, missing quotes, and JavaScript-only values
JSON is often used in API responses, configuration files, package metadata, logs, and data exchange. Validating before saving or sending JSON helps catch small syntax errors early.
Examples
- {"name":"Alex","age":30} → valid JSON object
- [1,2,3] → valid JSON array
- {"enabled":true,"items":null} → valid boolean and null values
- {"a":1,} → invalid because of a trailing comma
- {name:"Alex"} → invalid because the key is not in double quotes
FAQ
- What does this JSON validator do?
It checks whether your JSON is valid, shows parsing errors for invalid input, and can pretty-print or minify valid JSON.
- Does it support arrays and nested objects?
Yes. It validates standard JSON including arrays, nested objects, strings, numbers, booleans, and null values.
- Why is my JSON invalid?
Common causes include trailing commas, comments, single quotes around keys, missing quotes, unescaped characters, or invalid values such as NaN and undefined.
- Is JSON with comments valid?
No. Standard JSON does not allow comments. Some configuration formats look similar to JSON but are not valid JSON.
- Is my JSON uploaded or stored?
No. Validation runs locally in your browser and your JSON is not sent to a server.