JSON Validator
Paste JSON to check whether it is syntactically valid. Runs locally in your browser.
What is JSON validation?
JSON validation checks whether text conforms to the JSON grammar.
How to use this validator
- Paste or type JSON in the input panel.
- Click Validate JSON - or press ⌘/Ctrl + Enter.
- Read the result. Use Go to error to jump to the problem.
Common JSON syntax errors
- Trailing comma - a comma left after the last item in an object or array.
- Single-quoted strings - JSON only accepts double quotes for strings and keys.
- Unquoted keys - every object key must be a quoted string, not a bare identifier.
- Comments -
//and/* */are valid in JavaScript and JSON5 but not in JSON. - Unescaped control characters or backslashes - a literal newline or a lone backslash inside a string breaks parsing.
Validator vs. formatter
A validator answers one question - is this syntactically valid JSON? - and reports exactly where it isn't, without changing a single character. If you also need to check whether the data matches an expected structure, use the JSON Schema Validator. A formatter assumes the JSON is already valid and focuses on presentation, rewriting whitespace for readability. Reach for the validator first when you're not sure the JSON is well-formed; reach for the formatter once you know it is and just want it easier to read.
A practical validation workflow
When an API call or config file fails to parse somewhere in your own code, paste the raw payload here first. The line-and-column error tells you precisely where the parser gave up, which is usually faster than scanning the text by eye - especially for a payload with no line breaks at all. Fix that one issue and validate again, since a single syntax error can mask others further into the document.
Frequently asked questions
- What exactly does JSON validation check?
- Whether the text conforms to the JSON grammar: matched braces and brackets, double-quoted strings and keys, correctly placed commas and colons, and valid literals (true, false, null, and numbers). It doesn't check business rules like required fields - only whether the syntax itself is legal JSON.
- What's the most common syntax error this catches?
- A trailing comma after the last item in an object or array. It's easy to leave one in after deleting a line, and JSON - unlike JavaScript - treats it as a hard error rather than ignoring it.
- Why does the error point to a line that looks fine?
- Parsers report the position where they could no longer make sense of the input, which is often one token after the actual mistake. A missing comma, for example, is reported where the next value starts, not where the comma should have been.
- Does a successful validation mean the JSON is correct for my use case?
- It means the JSON is syntactically valid - nothing more. Whether it has the right fields, correct types, or matches an API's expected schema is a separate concern that this tool doesn't check.
- Should I validate before or after formatting?
- Validate first if you're not sure the JSON is well-formed - formatting can only work on JSON that already parses, so validating first tells you exactly where to fix things if it doesn't.
Related tools
Validate JSON data against a supported JSON Schema vocabulary.
Format, beautify, and minify JSON.
Explore nested JSON as a collapsible tree.
Produce compact single-line JSON.
Compare two JSON documents.
Convert an array of JSON objects into CSV.
Convert CSV back into JSON.
Convert JSON into readable YAML.
Convert YAML back to JSON.
Escape text into a JSON string literal.