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
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"] // valid
Single Quotes
JSON requires double quotes for strings and keys. Single quotes are not valid. 'hello' must be "hello".
{'name': 'John'} // invalid
{"name": "John"} // validMissing 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"} // validComments
JSON does not support comments of any kind. Neither // single-line nor /* multi-line */ comments are allowed.
{
// name
"name": "John"
} // invalidUnescaped Special Characters
Strings containing backslashes, quotes, or control characters must be properly escaped with a backslash.
{"path": "C:\Users"} // invalid
{"path": "C:\\Users"} // validWrong 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} // valid