JSON Validator
Validate JSON syntax and get clear error messages.
Loading…
About JSON Validator
A stray trailing comma in a config file or an API payload can cost an afternoon. Paste the document and the check runs shortly after you stop typing, with no button to press. A valid document is confirmed with its root type, the number of top-level keys when the root is an object, and a warning if any object repeats a key. An invalid one gets a plain-language message, with the position of the problem when your browser reports it.
Features
- Re-checks automatically while you type
- Shows the root type and the number of top-level keys
- Warns when an object repeats a key
- Syntax errors located by character position, with line and column where the browser supplies them
- Copies the checked input in one click
Limitations
- Input is capped at 200,000 characters.
- Only syntax is checked: there is no JSON Schema validation, so a document can be valid JSON and still wrong for your API.
- Comments, single quotes, trailing commas and unquoted keys are reported as errors because the browser's JSON parser is strict.
How it works
- Paste or type the JSON into the JSON input box.
- Wait a moment: the check starts shortly after you stop typing, so there is no button to press.
- Read the result, which is either a green Valid JSON notice or an error message under Check your input.
- Fix the problem near the position named in the message and keep editing until the notice turns green.
- Use Copy input to take the checked text with you, or Reset to start again.
Example input
{"name": "Auro", "tools": ["json-validator", "json-formatter"], "version": 1}Frequently asked questions
- JSON syntax allows a key to repeat, so the document is valid, but most parsers silently keep only the last value. The warning lists the repeated key names so you can find the entries that would be lost.
- JSON has no comment syntax, so both // and /* */ comments are errors, as are single-quoted strings, unquoted keys and values such as NaN. Remove them, or strip the comments first if the file came from a format that allows them.
- It gives the character position, and adds line and column in browsers whose parser reports them. When the browser's message has no position, you get a general hint to check for missing commas, quotes or brackets.
- The check uses your browser's built-in JSON parser and the text is not sent to a server, so nothing leaves the page. Nothing here needs an account, since the tool has no download button.
