How to use JSON Validator
- 1Paste your JSON into the box
- 2A verdict appears immediately — valid, or the parser's error
- 3Fix what the message describes
- 4Watch the verdict update as you edit
- 5Copy the corrected JSON back out
What JSON Validator does
Validating JSON answers one narrow question: can a parser read this text into values? That is worth separating from the questions people often think they are asking. Valid JSON is not necessarily correct JSON — it can have the wrong field names, missing sections, numbers where strings belong, or an entirely different structure from what a program expects, and still parse without complaint.
What validity does guarantee is that the syntax is well formed: quotes balanced, brackets matched, commas in legal positions, and every value one of the six types JSON permits. When an API rejects a payload or a config file fails to load, syntax is the first thing to rule out, and it is the only thing this tool checks.
When to use it
- A config file a program will not load
- Ruling out a syntax error takes seconds and eliminates the most common cause before you start investigating anything harder.
- Checking a hand-edited payload
- JSON typed or edited by hand is where trailing commas and single quotes creep in. Both are legal in a JavaScript object literal and illegal here.
- Confirming a response is complete
- A truncated download or a connection dropped mid-transfer produces JSON that ends abruptly. "Unexpected end of JSON input" identifies that immediately.
- Verifying without reformatting
- When a file has to keep its existing formatting — because it is under version control and you want a clean diff — you need a verdict, not a reformatted document.
JSON Validator settings explained
- Live verdict
- The check runs on every keystroke, so a document goes from invalid to valid the moment you fix the problem. There is no button to press.
- The parser's own message
- Errors come from the browser's built-in JSON parser rather than being reworded, and usually name the character position where parsing stopped. That position is where the parser gave up, which is often just after the real mistake.
- No modification
- The document is read and never rewritten. Nothing is reindented, reordered or normalised, so what you paste is what you copy back.
- Strict JSON
- The specification exactly: double-quoted keys and strings, no comments, no trailing commas, no single quotes, no unquoted keys. Supersets such as JSON5 and JSONC will be reported invalid, which is correct.
What validation does and does not check
| Question | Checked here? |
|---|---|
| Are brackets and quotes balanced? | Yes |
| Are commas in legal positions? | Yes |
| Is every value a legal JSON type? | Yes |
| Are the field names the ones expected? | No |
| Are required fields present? | No |
| Does it match a JSON Schema? | No |
Limits and what to expect
- Syntax only — a document can be valid and still be wrong for its purpose.
- No JSON Schema validation, so required fields and value types against a contract are not checked.
- Parsing stops at the first error, so a document with several problems reveals them one at a time.
- Strict JSON only: comments and trailing commas are reported invalid, because they are.
- Very large documents take a moment, since the whole text is parsed at once.
Troubleshooting
- The reported position seems to be past the real mistake
- The parser reports where it gave up, not where the document went wrong. A missing closing brace is only detected at the end of the file. Work backwards from the reported position to the last structure that was opened.
- My file is valid JSON5 but reported invalid
- That is correct. JSON5 and JSONC allow comments, trailing commas and unquoted keys, none of which are legal JSON. A strict parser stops at the first comment character. Those formats need their own parser.
- It says valid but my program still rejects it
- Then the problem is not syntax. The document parses but does not match what the program expects — a missing field, a number where a string belongs, or a different structure entirely. That is schema validation, which this tool does not do.
- I fixed one error and another appeared
- Parsing stops at the first problem, so errors surface one at a time. Hand-edited files often have several instances of the same mistake — check for other trailing commas or single quotes once you have identified the pattern.
Your files and your privacy
The document is parsed by the browser's own JSON implementation inside the page, with no request to a server. Nothing is transmitted, logged or retained. That matters specifically for JSON, which routinely carries access tokens, connection strings and customer records — material that should never be pasted into a hosted validator.
What to use next
FAQ
What makes JSON invalid?
Anything outside the specification: a trailing comma after the last item, single quotes instead of double, unquoted keys, comments, unescaped control characters in a string, or unbalanced brackets. The first three are legal in JavaScript object literals, which is why hand-written files trip on them so often.
My JSON is valid but my program still rejects it. Why?
Because validity is only about syntax. A document can parse perfectly and still have the wrong field names, be missing required sections, or use numbers where strings are expected. Checking that is schema validation, which is a different question from the one this tool answers.
What is the difference between validating and formatting?
Formatting parses the document and writes it back out indented, so it validates as a side effect but also changes the text. Validation gives a verdict and leaves the document untouched, which is what you want when the existing formatting has to be preserved for a clean diff.
Does it support comments or trailing commas?
No, and reporting them invalid is correct. Formats that allow them — JSON5, JSONC, tsconfig-style files — are supersets of JSON, not JSON. A strict parser stops at the first comment character.
Why does the error point past the actual mistake?
The position is where the parser could no longer continue, which is not always where you went wrong. A missing closing brace is only discovered at the end of the document. Trace back from the reported position to the last opened structure.
Is my JSON sent anywhere?
No. Parsing runs in your browser using its built-in JSON support, with no network request. The tool works offline.