JSON Validator
JSONFree · PrivateValidate JSON with precise error location and human-friendly explanations. Supports JSON5 and JSONC with comments and trailing commas. 100% client-side.
What is a JSON Validator?
A JSON validator checks whether a piece of text conforms to the JSON specification (RFC 8259). Unlike a formatter which assumes valid input, a validator's primary job is to tell you exactly what is wrong and where — line number, column, and a clear error message — so you can fix it fast.
This validator supports three modes: strict JSON, JSONC (JSON with Comments, used by VS Code configs andtsconfig.json), and a relaxed JSON5 mode that additionally allows unquoted keys and single-quoted strings.
How to use this JSON Validator
- Select your validation mode — Strict JSON, JSONC, or JSON5.
- Paste your JSON into the input box, or drop a file. Validation is instant and updates as you type.
- If invalid, the error panel shows the exact message and line/column number.
- Click Attempt Fix to see a repaired version using jsonrepair.
- Click Use repaired JSON to replace the input with the fixed version.
Why validate JSON with a private tool?
Config files, API payloads, and exported data often contain sensitive values — database credentials in config JSON, PII in API responses, proprietary schema structures. Pasting these into a server-side validator means your data is processed on someone else's machine and potentially logged. This validator runs entirely in your browser: the JSON never leaves your tab.
JSONC vs JSON5 — what's the difference?
JSONC (JSON with Comments) adds single-line (// …) and block (/* … */) comments, plus trailing commas after the last item. It is used by VS Code's settings.json, TypeScript'stsconfig.json, and many other developer tools.
JSON5 goes further: unquoted property names, single-quoted strings, hexadecimal numbers, multi-line strings, and positive/negative Infinity. It is less common but occasionally appears in Babel configs and custom serialisers.
Frequently Asked Questions
What is the difference between JSON and JSON5?
How do I find the exact line of a JSON error?
Can I validate JSONC (JSON with Comments)?
Why is my JSON invalid even though it looks correct?
Related Tools
Format, beautify, and minify JSON instantly in your browser. Syntax highlighting, error detection, sort keys, and one-click Fix. Your data never leaves your device.
Explore JSON as a collapsible tree with virtualized rendering for 100k+ nodes. Search keys and values, copy JSONPath, and navigate large structures instantly.
Compare two JSON objects semantically — key-order insensitive. Side-by-side color-coded diff with added, removed, and changed values highlighted clearly.