JSON Validator
Paste JSON to check whether it is well-formed. Invalid input produces a clear error message with the error position where possible.
Press Ctrl+Enter to validate.
What makes JSON invalid?
JSON has a strict grammar. Common mistakes that cause parse errors include:
- Trailing commas — e.g.
{"a": 1,}(not allowed in JSON, though valid in JavaScript). - Single quotes — JSON requires double-quoted strings.
- Unquoted keys — all object keys must be in double quotes.
- Comments — JSON does not support
//or/* */comments. - Undefined / NaN / Infinity — these JavaScript values are not valid JSON.
Privacy
Validation uses the browser's native JSON.parse. Your input is never sent to a server.
Frequently Asked Questions
Is my JSON payload sent to a server during validation?
No. Validation is performed entirely client-side using your browser's native JSON engine. Sensitive data, API keys, and configurations never leave your device.
Why does valid JavaScript code fail JSON validation?
JSON is a strict data interchange subset of JavaScript. Single-quoted strings, trailing commas, unquoted keys, functions, and comments are valid in JS but illegal in RFC 8259 JSON.
How does the validator pinpoint error locations?
The validator parses the syntax error message and character offset to identify the exact line and column number where malformed syntax occurred.
What is the maximum JSON payload size this validator can handle?
Because processing is client-side, the tool can handle files up to hundreds of megabytes depending on your machine's available browser memory.
In-depth guides & articles
- JSON vs XML: What's the Difference?
A practical comparison of JSON and XML — syntax, readability, data structures, and when each format is commonly used.
- What Is JSON? The Complete Guide to Structure, Types, Pitfalls, and Best Practices
A comprehensive reference guide to JavaScript Object Notation (JSON): specification, data types, BigInt handling, serialization pitfalls, security considerations, and formatting tools.