fileview.dev

Online JSON validator

Paste or drop JSON to validate it in your browser: syntax errors are underlined at the exact character, duplicate keys are found per object scope, and an optional JSON Schema check reports every violation with its path.

Validate JSONNothing uploaded. No signup.

Three kinds of wrong

Most validators answer one question — does this parse? That is the least interesting of the three ways a JSON document can be wrong.

It does not parse
A missing comma, an unclosed brace, a trailing comma that some parsers accept and others do not. The error is underlined at the character where the parser gave up, with the reason on hover, and F8 steps through every problem in the file.
It parses, but not as you meant
A duplicate key is valid JSON. The last value silently wins, and the first one you wrote is gone. Detecting this properly needs scope tracking — the same key in two sibling objects is perfectly legal — so a text search for repeated strings gives false positives on nearly every real document. This checks scopes.
It parses, but does not match your schema
A field that should be a number arrives as a string; a required property is missing. Supply a JSON Schema and every violation is reported with its JSONPath, the keyword that failed, and a squiggle in the source at the right line.

JSON Schema support

Draft-06, draft-07, 2019-09 and 2020-12 are all supported. The right validator build is selected from the $schema your document declares, rather than assuming one draft and failing confusingly on the others — which is the single most common way schema validation goes wrong in browser tools.

Repairing rather than only reporting

When a document is nearly valid — trailing commas, unquoted keys, single quotes — it can be repaired automatically. The repair is always reported ("removed 2 trailing commas") rather than applied silently, and it goes through the editor’s undo stack so one Ctrl+Z puts it back.

Validate JSON

Questions

How do I check if my JSON is valid?

Paste it into fileviewer.dev or drop the file onto the page. It is parsed immediately and any syntax error is underlined at the exact character, with the reason shown on hover. The status bar says whether the document is valid and how many problems it has.

Does it detect duplicate keys?

Yes, and it does so per object scope. The same key appearing in two sibling objects is legal JSON and is not flagged; the same key appearing twice in one object is flagged, with the line where it was first defined, because the last value silently wins.

Which JSON Schema drafts are supported?

Draft-06, draft-07, 2019-09 and 2020-12. The validator build is chosen from the $schema keyword your document declares, so a 2020-12 schema is validated as 2020-12 rather than rejected by a draft-07 engine.

Is my JSON sent to a server to be validated?

No. Parsing, validation and schema checking all run in your browser. Nothing is uploaded, which matters because the documents people most often need to validate are the ones with credentials in them.