How it works
How to use the JSON Validator
Paste your JSON
Paste or drop your JSON into the editor. Validation runs automatically on every keystroke.
Read the diagnosis
Errors are underlined in the editor and explained in plain English with a suggested fix.
Jump to the problem
Click the error location to move the cursor straight to it, even in files with thousands of lines.
Repair automatically
Use Auto-repair to fix common problems like trailing commas, comments, single quotes and unquoted keys. Undo is always one keystroke away.
Common JSON errors and how to fix them
| Error | Invalid | Valid |
|---|---|---|
| Trailing comma | {"a": 1,} | {"a": 1} |
| Single quotes | {'a': 'b'} | {"a": "b"} |
| Unquoted key | {a: 1} | {"a": 1} |
| Comments | {"a": 1 // note} | {"a": 1} |
| Missing comma | {"a": 1 "b": 2} | {"a": 1, "b": 2} |
| Wrong literal case | {"ok": True} | {"ok": true} |
| Not a JSON value | {"n": NaN} | {"n": null} |
| Leading zero | {"zip": 01234} | {"zip": "01234"} |
| Raw line break in string | "line 1 | "line 1\nline 2" |
| Invalid escape | "C:\path" | "C:\\path" |
Beyond syntax errors, the validator also warns about duplicate keys (most parsers silently keep only the last one) and integers larger than 253, which JavaScript cannot represent exactly.
Built for developers
Why developers use it
Private by design
Everything runs locally in your browser. No uploads, no tracking of your data, no accounts.
Precise errors
Exact line and column, a plain-English explanation and a suggested fix for every syntax error.
Lossless formatting
Big integers, decimals and escapes are preserved byte-for-byte. Only whitespace changes.
Built for large files
A background worker, virtualised rendering and a fast custom parser keep big files smooth.
Tree explorer
Collapsible, searchable tree with JSONPath copying and jump-to-source.
Works offline
Install it as an app or keep using it without a connection once loaded.
FAQ
Frequently asked questions
Why does my browser say “Unexpected token” but not where?
Built-in JSON parsers report errors differently in every browser, and some give no position at all. This validator uses its own strict parser so you always get an exact line and column plus a human-readable explanation.
Is JSON with comments valid?
No. Standard JSON does not allow comments. Formats such as JSONC or JSON5 do, but most APIs and JSON.parse will reject them. Auto-repair can strip comments for you.
Are duplicate keys invalid?
The JSON specification says keys “should” be unique, so duplicates are technically allowed but behave unpredictably — most parsers keep only the last value. The validator flags them as warnings so you can decide.
Is my JSON sent to a server?
No. Parsing, validation, formatting and the tree view all run in your browser using JavaScript and a Web Worker. Your data never leaves your device. You can even use the tool offline once the page has loaded.
How large a JSON file can I open?
Files of tens of megabytes work well on a modern laptop. Processing runs in a background thread so the page stays responsive, the editor only renders what is visible, and the tree view is virtualised. The hard limit is 200 MB per file.
Does formatting change my numbers?
Never. Many online formatters use JSON.parse, which silently rounds big integers (like 64-bit IDs) and rewrites numbers such as 1.0 or 1e3. This tool keeps every number and string escape exactly as you wrote it — only whitespace changes.
Keep going
Related tools
- JSON FormatterFormat, validate and explore JSON
- JSON ViewerExplore JSON as a searchable tree
- JSON CompareFind semantic differences between two JSON documents
- JSON DiffSide-by-side or unified line diff of two JSON files
- JSON EditorEdit JSON with live validation
- JSON SorterSort JSON keys alphabetically
- JSON to CSVConvert JSON arrays to CSV and CSV back to JSON
- JSON to XMLConvert JSON to XML and XML to JSON