Check whether your JSON is valid and see the exact line and column of any error. Paste JSON into the editor or open a .json file from your device, then choose Validate — or switch on Live to check it as you type. When the input is broken, Auto-repair offers a deterministic, previewed fix that you apply yourself. Validation and repair both run on your device with the browser’s built-in JSON parser, so your data stays private: nothing is uploaded, and nothing is rewritten unless you explicitly choose Apply repair.
How to use the JSON validator
- Paste or open your JSON — Paste JSON into the editor, or open a
.jsonfile from your device. - Choose Validate, or turn on Live — Select Validate to check the syntax, or switch on Live to recheck automatically about 300 ms after you stop typing. Empty input stays idle and produces no verdict.
- Read the result and the error location — A valid result reads ✓ Valid JSON and adds chips for the root type (object, array, string, number, boolean, or null), the number of keys for an object or items for an array, and the size in bytes. An invalid result reads ✕ Invalid JSON, followed by a plain-language explanation and Line X, Column Y when that position is known.
- Jump to the error and fix it — The editor marks the offending line. Choose Jump to error to scroll straight to it, correct the JSON, and validate again. Clear empties the input and the result so you can start a new check.
- Or auto-repair it, then review the preview — Choose Auto-repair to see the safe fixes that apply, listed as chips, with the repaired JSON in a read-only preview. Nothing changes until you choose Apply repair, which replaces the input and re-validates immediately.
Reading an invalid result
An invalid result leads with a short, human-readable sentence that names the likely problem — for example a trailing comma before a closing brace, or a string that is not closed. Below it you get the exact Line X, Column Y when the parser reports a position, plus the original parser message as a technical detail. The editor highlights the same line so you can see it in context. If you need to share the problem, Copy error details puts the summary, the line and column, and the raw message on your clipboard in one step. You can also choose Auto-repair to have the validator propose a fix.
Auto-repairing invalid JSON
When the JSON is invalid, Auto-repair runs a fixed, deterministic set of safe corrections and only reports success if the result actually parses:
- Removing trailing commas before
}or]. - Adding double quotes around unquoted property names, such as
{name: …}→{"name": …}. - Converting single-quoted strings to double-quoted strings.
- Replacing curly or typographic quotes (
""'') with straight quotes. - Replacing the Python literals
True,False, andNonewithtrue,false, andnull.
Every change is listed, and the repaired text appears in a read-only preview — your input is untouched. Choose Apply repair to replace the input with the repaired JSON and re-validate it in one step; choose Dismiss to leave the original as it is. If the safe fixes are not enough, the validator says it could not repair the JSON automatically and keeps the invalid result, so you can fix it by hand. There is no AI and no guesswork, and a repair is never applied silently or automatically.
What counts as valid JSON here
The validator asks one question: does this text follow JSON syntax? It follows the JSON standard rather than JavaScript, so the following are all valid and accepted: a bare top-level value such as 42, "text", or null; nested objects and arrays of any depth; escaped characters such as \n and \u00e9; and numbers written in either integer or exponent form. Duplicate keys are also accepted, because the JSON parser keeps the last one.
What it does not do: it does not compare your data against a JSON Schema, check that fields are the type or shape your application expects, or warn you about repeated keys. A “valid” result means the text parses — nothing more.
Common JSON errors and what they mean
The message you see comes from your browser’s JSON parser, and it points at the character where parsing stopped. That is usually the first thing to fix, but not always the actual mistake — a missing comma five lines earlier can make the parser complain about the value that follows it.
Unexpected token …— the parser met a character that cannot appear where it is. Typical causes: a missing comma between two items, a stray character, a JavaScript-only literal such asNaN,undefined, orInfinity, a//comment, or a smart quote ("or") pasted from a word processor. Read the position in the message, then inspect the characters just before it.- Trailing comma before
}or]—{"name": "ToolNava",}and[1, 2, 3,]are invalid, even though JavaScript allows them. Chrome reports the closing bracket as an unexpected token, or says it expected a double-quoted property name. Delete the final comma. - Unquoted keys —
{name: "ToolNava"}is not JSON: object keys must be double-quoted strings. The parser stops atnameand expects a quoted property name, so it reports the error at that column. Write{"name": "ToolNava"}. - Single quotes instead of double quotes —
{'name': 'ToolNava'}fails for the same reason. JSON accepts only"around keys and strings, and a literal newline inside a string is invalid — it must be escaped as\n. - Unclosed brackets or braces — in
{"items": [1, 2}, the array was never closed, so the parser reaches the}where a,or]was expected and points at that line. When the input simply ends, for example{"items":, the parser reportsUnexpected end of JSON inputand may give no position at all; the tool then shows an invalid result with no line and column, and the fix is usually the last missing}or].
Is it private?
Your JSON never leaves your device. The page parses it in the browser, so there is no upload step, no copy kept on a server, and no stored history — the tool has no backend that could retain your input. You do not need an account, and no AI is involved: because validation and auto-repair are deterministic, the same input always gives the same result, and your data is never rewritten on its own — a repair is shown as a preview and applied only when you choose Apply repair. Licensed or customer data can therefore be checked without sending it anywhere. For a formatted or minified version of valid JSON, use the JSON Formatter; to go the other way with encoded text, see Base64.