JSON Validator & Formatter
Paste your JSON to validate syntax, find errors with exact positions, and get beautifully formatted output in one click.
Instant Validation
Validate your JSON in milliseconds. Get clear error messages with exact line and column numbers to fix issues fast.
Auto Formatting
Valid JSON is automatically formatted with proper indentation. Compare input and output size side by side.
Copy & Share
Copy formatted JSON with one click. Perfect for cleaning up API responses, config files, and data payloads.
What Is JSON?
JSON (JavaScript Object Notation) is a lightweight data interchange format. It is easy for humans to read and write, and easy for machines to parse and generate. JSON is the most widely used format for APIs, configuration files, and data storage on the web.
A valid JSON document must follow strict syntax rules: strings must use double quotes, there are no trailing commas, keys must be quoted, and only specific value types are allowed (strings, numbers, booleans, null, arrays, and objects). Unlike JavaScript, JSON does not support comments, single quotes, or undefined values.
Because JSON syntax is strict, even a single misplaced character will make the entire document invalid. A JSON validator helps you find these issues instantly, saving time when debugging API responses, configuration files, or data exports.
Common JSON Errors
Unexpected Token
The parser stopped at a character it cannot accept there. It names the position, not the cause: the real mistake is usually a trailing comma, a single quote or an unquoted key just before it.
{"a": 1,} // Unexpected token }
{"a": 1} // validHow to fix unexpected token→Trailing Commas
JSON does not allow a comma after the last item in an array or object. [1, 2, 3,] is invalid. Remove the trailing comma.
["a", "b", "c",] // invalid ["a", "b", "c"] // validHow to fix trailing commas→
Single Quotes
JSON requires double quotes for strings and keys. Single quotes are not valid. 'hello' must be "hello".
{'name': 'John'} // invalid
{"name": "John"} // validHow to fix single quotes→Missing Quotes on Keys
All keys in JSON objects must be double-quoted strings. Unquoted keys are valid in JavaScript but not in JSON.
{name: "John"} // invalid
{"name": "John"} // validHow to fix missing quotes on keys→Missing Comma
Every pair in an object and every item in an array is separated by a comma. Leaving one out is the mirror of leaving one too many.
{"a": 1 "b": 2} // invalid
{"a": 1, "b": 2} // validHow to fix missing comma→Unclosed Bracket
Every { and [ needs its partner. The parser only notices at the end of the file, so the reported position is rarely where the mistake is.
{"a": {"b": 1} // invalid
{"a": {"b": 1}} // validHow to fix unclosed bracket→Comments
JSON does not support comments of any kind. Neither // single-line nor /* multi-line */ comments are allowed.
{
// name
"name": "John"
} // invalidHow to fix comments→Unescaped Special Characters
Strings containing backslashes, quotes, or control characters must be properly escaped with a backslash.
{"path": "C:\Users"} // invalid
{"path": "C:\\Users"} // validHow to fix unescaped special characters→Wrong Boolean/Null Casing
JSON booleans and null must be lowercase: true, false, null. True, False, None, NULL are all invalid.
{"active": True} // invalid
{"active": true} // validHow to fix wrong boolean/null casing→Browse every JSON error guide for the rest, each with the wrong and right version side by side.