Skip to content
ToolZone

JSON Validator

Check whether a block of JSON is syntactically correct, pointing out the specific error and location if the structure is malformed or invalid.

Runs in your browser. Nothing you enter or upload leaves your device.

JSON
Enter JSON to validate.

Keyboard shortcuts

Run the main action
⌘ / Ctrl + Enter
Copy the result
⌘ / Ctrl + Shift + Enter
Download the result
⌘ / Ctrl + S
Paste a file or image into file tools
⌘ / Ctrl + V
Search all tools
⌘ / Ctrl + K
Show these shortcuts
?

You can also drop files anywhere on the page.

About the JSON Validator

The JSON Validator checks whether text is valid JSON the moment you paste or edit it. If something is wrong, it shows the line and column and highlights the problem in context; if it's valid, you can format or minify it and see its key count and nesting depth.

How it works

The text is passed to the browser's built-in JSON.parse every time it changes. If parsing succeeds, the input is valid JSON; if it throws, the error message is displayed. Browsers word these messages differently, and most include a position or line and column number.

This is a syntax check against the JSON standard. Any valid JSON value passes, including a bare number, string, true, false, or null. It does not check the data against a schema, and it does not warn about duplicate keys, which the JSON standard discourages but does not forbid.

How to use

  1. 1

    Paste or type JSON into the box, or click Open file.

  2. 2

    Check the message below: green for valid, red with the error location for invalid.

  3. 3

    Fix the highlighted line, then use Format or Minify if you need to.

Worked examples

Valid object

A small settings object.

Input
{"theme": "dark", "fontSize": 14}
Result
Valid JSON, no syntax errors found.

Single quotes

JSON copied from JavaScript code.

Input
{'theme': 'dark'}
Result
Invalid JSON, with the line and column of the single quote highlighted.

JSON requires double quotes for keys and strings.

Bare value

A lone number.

Input
42
Result
Valid JSON, no syntax errors found.

A top-level value does not have to be an object or array.

Limitations
It checks syntax only, not structure against a schema. Duplicate keys are not reported. Error wording, and whether a line and column can be shown, depend on your browser.
Assumptions
Input should follow standard JSON, not JSON5 or JSONC.
Privacy
Validation runs in your browser; your JSON is not sent anywhere.

Frequently asked questions

What is a common cause of invalid JSON?+

Trailing commas after the last item are the most frequent, followed by single quotes, unquoted keys, and comments.

Does this tool fix errors automatically?+

No. It tells you what is wrong and where, so you can fix it. Once the JSON is valid, the Format button tidies the layout.

Is a single number or string valid JSON?+

Yes. Modern JSON allows any value at the top level, so 42 or "hello" are valid.

Can it validate against a JSON Schema?+

No. It checks syntax only.

Related tools