JSON Validator
Validate JSON syntax with precise line and column errors, and check documents against a JSON Schema. Runs locally in your browser, nothing uploaded.
Last reviewed by the Radiatus Cloud team
Need this built for your product?
We design, build & host secure software & APIs.
Two kinds of valid
Syntactic validity means the document parses: braces balance, strings are double-quoted, no trailing commas. Semantic validity means the document has the shape your system expects: required fields present, types correct, values within permitted ranges. A payload can be perfectly parseable and still be wrong for your API. This validator handles both, syntax first and then optional JSON Schema validation.
Reading a syntax error
Parse errors are reported at the point the parser gave up, which is often after the real mistake. A missing comma between two objects is reported at the start of the second object. An unterminated string swallows everything until the next quote, so the error surfaces far below the line at fault. When the reported position looks innocent, check the line above it.
JSON Schema
JSON Schema describes the expected structure of a document: which properties are required, what types they take, patterns strings must match, numeric bounds, and how arrays and nested objects are constrained. It is the practical way to validate API request bodies and configuration files, and it is what OpenAPI uses to describe payloads.
The most useful keyword and the most commonly forgotten is additionalProperties: false. Without it a schema silently accepts unknown fields, so a typo in an optional property name passes validation and is then ignored at runtime. That failure mode is hard to debug precisely because nothing complains.
Duplicate keys
The specification says object keys should be unique but does not require parsers to reject duplicates. Most parsers, including the browser's, keep the last occurrence and discard earlier ones without warning. That hides real bugs when a document is assembled by concatenation or templating. This validator reports duplicate keys explicitly rather than silently collapsing them.
Everything stays local
Validation runs in your browser. Config files and API payloads routinely contain secrets, and sending them to a remote validator to check a missing brace is an unnecessary disclosure.
Related tools
- JSON Formatter — Format and beautify JSON in your browser. Pinpoints syntax errors by line and column, flags unsafe integers, and never uploads your data to a server.
- Regex Tester — Test regular expressions against sample text with live match highlighting, capture groups and flag control. Runs entirely in your browser.
- HTML Minifier — Minify HTML by removing comments and redundant whitespace, without breaking inline elements or pre blocks. Runs entirely in your browser.
- CSS Minifier — Minify CSS by stripping comments and whitespace safely. Runs in your browser with no upload, and reports the byte saving before and after gzip.
Frequently Asked Questions
What is the difference between a JSON validator and a formatter?
Both parse the document, so both detect syntax errors. A formatter re-serialises it readably; a validator reports problems precisely and, with a schema, checks the document's shape against expectations rather than only its syntax.
What is JSON Schema used for?
It declares the expected structure of a document: required properties, types, string patterns, numeric ranges and nested constraints. It validates API request bodies, configuration files and message payloads, and it underpins how OpenAPI describes data.
Are duplicate keys allowed in JSON?
The specification says names should be unique but stops short of requiring rejection. Most parsers keep the last value and silently discard earlier ones, which masks bugs in generated documents. This validator reports duplicates rather than hiding them.
Why does the error point at the wrong line?
Parsers report where they gave up, not where the mistake is. A missing comma is reported at the start of the next element, and an unterminated string swallows text until the next quote. If the reported line looks fine, inspect the lines above it.
Is my data sent anywhere?
No. Both syntax and schema validation run in your browser. Nothing is transmitted, which matters because configuration files and API payloads frequently contain credentials.
Privacy & Security
Validation happens in your browser.
How to Use
Paste JSON and click Validate. Errors will be shown if invalid.
Disclaimer: This tool is provided "as is" without warranty of any kind. Results are for educational and utility purposes.
Related Tools
JSON Formatter
DeveloperFormat and beautify JSON in your browser. Pinpoints syntax errors by line and column, flags unsafe integers, and never uploads your data to a server.
Regex Tester
DeveloperTest regular expressions against sample text with live match highlighting, capture groups and flag control. Runs entirely in your browser.
HTML Minifier
DeveloperMinify HTML by removing comments and redundant whitespace, without breaking inline elements or pre blocks. Runs entirely in your browser.