Dev Utilities
Validate JSON in your browser
JSON Validator parses your input with the same rules browsers apply to JSON.parse and prints the verdict Valid JSON, or Error: followed by the parser message. Developers use it to sanity-check API payloads before sending them and catch trailing commas or unquoted keys in configuration. Valid JSON text includes objects, arrays, numbers, strings, booleans and null on their own, and duplicate keys parse with the last value winning, exactly as JSON.parse behaves.
How to use JSON Validator
- Open JSON Validator in the Toolbox101 app.
- Paste or type JSON into the
JSONbox. The check reruns on every change. - Read the verdict in the
Outputbox:Valid JSONwhen the text parses, orError:followed by the parser's message. - Fix the spot the error message points to and watch the verdict return to
Valid JSON.
Worked example
JSON Validator returns the output below for this input.
Input
{"name": "toolbox101", "tools": 124, "works": true}Output
Valid JSONCheck it yourself: open JSON Validator and enter the same input.
Frequently asked questions
What does the tool report for invalid JSON?
Invalid input prints Error: followed by the parser's message, which names what went wrong, for example an unexpected token or a missing closing brace. Fix the reported spot and the verdict flips to Valid JSON on the next keystroke, so you can iterate on a broken payload until it parses.
Why does it call JSON with duplicate keys valid?
JSON.parse accepts duplicate names and keeps the last value, and this tool mirrors that behavior, so a payload with two same-named keys is reported as Valid JSON. The JSON specification only recommends unique names rather than requiring them, and parsers differ; this one follows the browser.
Is a plain number or string valid JSON?
Yes. JSON text can be any single value, so input like 42, true, null or a quoted string is valid and prints Valid JSON. What fails instead: single quotes around strings, unquoted keys, trailing commas, comments and leading zeros, none of which are part of the JSON specification.
How is JSON Validator different from the JSON formatter?
The formatter pretty-prints or minifies JSON and needs valid input to do it, while this validator only reports the verdict and never rewrites your text. A common order is to validate first, then send the payload to the formatter when you also need an indented copy.
Use JSON Validator now
Runs in your browser. Nothing you type is uploaded.