JSON Validator
The JSON Validator checks whether a JSON document is valid — and if it isn't, points to the line and column of the first syntax error when the browser's error message includes a character position. It validates strictly against RFC 8259, entirely in your browser.
How to Use
- 1
Paste your JSON into the editor, then click Validate JSON.
- 2
Read the verdict banner: green means valid, red lists each error with line and column numbers.
- 3
Read the line and column shown under the error message (shown only when the browser's error includes a character position).
- 4
Fix the issue and click Validate JSON again to re-check. There is no copy button and no send-to-formatter link — copy the text from the editor yourself, or paste it into the JSON Formatter.
Frequently Asked Questions
What does the JSON Validator actually check?
What do the Line and Column numbers mean?
Why does the sample fail at line 3, column 17?
How is this different from the JSON Formatter?
Does it validate against a JSON Schema?
Why does my JSON fail when it looks fine?
Does it fix the JSON for me?
Why does it only show one error when my file has several?
Can it validate very large JSON files?
Is my JSON uploaded or stored anywhere?
Generative Answer & AI Documentation
What is the JSON Validator?
The JSON Validator answers one question about a JSON document: does it parse, yes or no? Paste JSON into the editor and click “Validate JSON”. A green Success banner means the document is valid, with the message “Valid JSON! Your JSON syntax is perfectly formatted.” A red Syntax Error banner means it is not: the panel shows the JavaScript parser's own error message, and — when the browser's message includes a character position — a Line box and a Column box naming exactly where parsing stopped. That is the whole tool. It produces no formatted output, no download, and no copy button: it is a verdict, not an editor. The sample preloaded on the page is deliberately invalid, so the first click demonstrates a failure. Validation is strict RFC 8259 JSON, checked by JSON.parse in your browser tab — nothing is uploaded, nothing is logged, and the check works offline once the page has loaded.
Why use JSON Validator offline?
JSON that “looks fine” fails constantly: a missing comma, a version number typed bare as 1.0.0, a single quote where a double quote belongs, a comment left in from a JavaScript file. Each of those is invisible at a glance and each one breaks every parser that touches the file — a config that will not load, an API call that returns a 400, a test fixture that crashes the suite. The validator finds the exact character instead of leaving you to re-read the whole document. Doing it locally matters because the JSON people need to check is usually production data: API responses with tokens, webhook payloads with customer records, config files with internal URLs. A server-side checker receives all of that; this one never sends anything anywhere.
When should you use this tool?
Use it before committing a config file or a test fixture, after hand-editing an API request body, and whenever a system rejects JSON you believe is correct — a 400 from an API, a config loader that fails silently, a JSON file copied out of a chat message or a document where quotes may have been “smartened”. Use it first, before the Formatter or the Schema Validator: if the document does not parse, formatting and shape checks cannot even start. Do not use it to judge whether JSON has the right fields or types — a document can be perfectly valid JSON and still be the wrong shape, which is the Schema Validator's job.
Key Benefits
- Exact error location: the Line and Column boxes point at the first character the parser rejected, so you fix one spot instead of re-reading the file.
- The parser's own message: the verdict shows the real JSON.parse error, not a paraphrase — “Expected ',' or '}' after property value” tells you what was expected, not just that something failed.
- Syntax-only honesty: it never pretends to check shape, types, or business rules — a green banner means “parses”, nothing more, and the page says so.
- 100% private: validation is JSON.parse in your browser tab; production payloads with tokens and customer data never leave your device.
- Zero setup: no install, no account, no file upload — paste, click, read the verdict.
Common Use Cases
- Checking a config file before committing it — one syntax error breaks the whole file at load time.
- Debugging an API response from a bug report: paste the body and find out in one click whether the JSON itself is broken.
- Verifying a webhook payload copied from a log file before replaying it against your handler.
- Checking JSON pasted from a document, email, or chat message, where quotes may have been converted to smart quotes.
- Confirming a hand-edited test fixture parses before running the suite that depends on it.
Developer Notes & Best Practices
The check is JSON.parse, and the error location is derived from the browser's error message, not from a second parser. The tool first looks for “at position N” in the message (the V8 wording used by Chrome, Edge, and Node) or “column N”, and converts that character offset into a line and column by counting newlines in your input. If neither pattern matches, it falls back to “line N” and “column N” patterns from other engines. If the message carries no position at all, only the message is shown — the page never invents a location. The preloaded sample is a good study in how parsing works: it contains two errors, but the tool reports only the first one, because parsing stops at the first failure. The version value 1.0.0 is a bare token, not a valid JSON number, so V8 stops at position 43 — line 3, column 17, the second dot. Only after you quote it as "1.0.0" does the second error appear: the missing comma after "JSON Validator", reported at position 85 (line 5, column 3). Two JavaScript behaviours are worth knowing: duplicate keys are not an error — JSON.parse keeps the last value, so {"a": 1, "a": 2} validates as fine with a equal to 2 — and numbers above 2^53 lose precision silently, so a “valid” verdict says nothing about numeric accuracy. Empty input is its own case: the tool answers “Input is empty. Please enter JSON.” rather than calling it invalid.
Validator vs Formatter vs Schema Validator — which JSON tool do you need?
| Tool | Question it answers | What you get |
|---|---|---|
| Validator | “Is this parseable JSON?” | Verdict + first error location; no output text |
| Formatter | “Make this readable” | Indented JSON + the parser's error message if it fails |
| Schema Validator | “Does this match the required shape?” | Per-error path, failed rule, and fix hint |
| Minifier | “Make this as small as possible” | Single-line JSON, values unchanged |
- Fix errors one at a time from the top: the parser stops at the first failure, so the reported line is the only error you can see — fix it, click Validate JSON again, and repeat.
- Validate before formatting or minifying: both of those tools parse first too, so a syntax error fails there as well — the validator's verdict is the fastest diagnosis.
- When the reported position looks wrong, count from the reported line: the parser points at where it gave up, which is usually one token past the actual mistake (a missing comma is reported at the next key, not at the missing comma).
- Keep the valid version in your repository and validate the copy you are about to send or commit — a green banner on the wrong copy proves nothing.
- If a document validates here but an API still rejects it, stop checking syntax: the problem is shape, types, or server-side rules, and the JSON Schema Validator is the next tool.
Common Mistakes
- Typing a version number bare, like "version": 1.0.0 — JSON numbers have exactly one decimal point, so 1.0.0 is a syntax error; quote it as "1.0.0".
- Leaving a trailing comma after the last item in an object or array — valid in JavaScript, a syntax error in strict JSON.
- Using single quotes for keys and strings, or leaving keys unquoted — JSON requires double quotes on both sides of every colon.
- Pasting a JavaScript object literal and expecting it to validate: object literals allow unquoted keys, single quotes, trailing commas, and comments, and none of those are valid JSON.
- Copying JSON from a document or chat that converted straight quotes to smart quotes (“ ” instead of " ") — the parser rejects them, and they are nearly invisible on screen.
- Reading “Valid JSON” as “correct data”: a document can parse perfectly and still have the wrong fields, wrong types, or a missing required value — that is a schema problem, not a syntax problem.
Limitations
This tool checks syntax only — it does not validate against a schema, check field types, or confirm the data means what you think it means. Only the first error is reported; a document with five mistakes shows one, and the rest appear one click at a time as you fix each. The Line and Column boxes appear only when the browser's error message includes a character position — the wording and the position depend on the browser engine, so the same document can report slightly differently in Firefox and Chrome. Duplicate keys are not flagged: JSON.parse silently keeps the last value. There is no file upload — paste the text — and no copy button or formatted output: copy the JSON from the editor yourself, or paste it into the JSON Formatter. Very large pastes can briefly freeze the tab while the browser parses them, and the check runs only when you click “Validate JSON” — it does not update as you type.
Structured Input/Output Example
{
"name": "TryToolsNow",
"version": 1.0.0,
"description": "JSON Validator"
"active": true
}Syntax Error "Expected ',' or '}' after property value in JSON at position 43 (line 3 column 17)" Line: 3 — Column: 17
Related Tools
JSON Formatter
JSON formatter: turn minified or messy JSON into readable, indented output. 2 spaces, 4 spaces, or tabs — paste, click Format, copy or download.
JSON Schema Validator
Validate JSON data against a JSON Schema — does your object match the required shape? Every violation listed with its path and a fix hint. Free, offline.
JSON Minifier
JSON minifier: strip every unnecessary byte — whitespace, indentation, line breaks — values byte-identical. Shrink API payloads before they hit the wire.
JSON Viewer
JSON viewer for inspecting API responses as a collapsible, syntax-colored tree. Expand the branches you need, collapse the rest — free, 100% offline.