About the JSON Validator
This free JSON validator checks whether your text is valid JSON and reports the exact line and column of any syntax error. Use it for API responses, config files, or any JSON string. Validation runs in your browser—your data never leaves your device. Part of our developer tools; you can also format, minify, or diff JSON on dedicated pages.
Why Validate JSON?
Invalid JSON causes runtime errors in JavaScript, broken API integrations, and failed config loads. A JSON validator tells you if the structure is correct and, when it isn't, where the first error is. Messages like "Unexpected token" or "JSON parse error at position 42" are easier to fix when you see the line and column—our tool extracts that from the parser so you can jump straight to the problem.
How to Use This Validator
Paste your JSON into the input box and click Validate. If it's valid, you'll see "Valid JSON" in green. If not, we show the error message and line (and column when available). You can also use Format or Minify on this page; both require valid JSON and will surface the same error details. For comparing two JSON blobs, use the Diff tab or our JSON diff page.
Common JSON Errors and Fixes
Trailing comma: JSON does not allow a comma after the last element in an array or object. Remove it. Single quotes: Keys and string values must use double quotes. Comments: JSON does not support // or /* */. Remove them or strip before validating. Unescaped quotes: Inside a string, a double quote must be written as \". Our validator shows the line so you can fix the escape. For more, see our blog posts on fixing JSON parse errors and validating JSON in JavaScript.
Validate JSON in JavaScript
In code, you can validate with JSON.parse(). It throws on invalid input; the error message often includes a position. Our tool does the same parsing in the browser and turns that into a human-readable line/column. For production, validate before storing or sending; this page is ideal for quick checks and debugging.
Related Tools
Need to beautify? Use our JSON formatter. Need to shrink payload size? Use the JSON minifier. Need to compare two JSON files? Use the JSON diff tool. All run in the browser with the same line/column error reporting. More resources: blog, FAQ, IP lookup.
FAQ
What does a JSON validator do? It checks if a string is valid JSON and reports the first syntax error, including line and column when possible.
Is this JSON validator free? Yes. No signup; validation happens in your browser.
Why do I get "Unexpected token" in JSON? Usually a trailing comma, missing comma between properties, or an invalid character (e.g. a comment). Fix the line we report.
Can I validate JSON from a URL? Yes. Use "Fetch from URL" in Advanced Options, then click Validate (or Format) to check the response.