Skip to content
TaskNinja

HomeToolsJSON FormatterJSON Validator

JSON Validator

JSON Validator tells you in one click whether a block of JSON is valid, and if not, which character on which line is wrong and how to fix it.

JsonTidyFreeNo signupOn your device
Opening the tool…

What this tool does

Check if JSON is valid and see exactly where it breaks: line, column and a plain reason. Repair trailing commas and quotes in one click. Runs in your browser.

How to use it

  1. Paste the JSON, or open a .json, .jsonl or .geojson file from your device.

  2. Press Format JSON. Valid JSON comes back formatted, with a count of keys, objects, arrays and nesting depth.

  3. If it is not valid, read the message under the button: it gives the line, the column and the reason, and shows that line with a ^ under the problem.

  4. Correct it in the box and press Format JSON again, or press Fix mistakes and format if the message says the mistake can be fixed for you.

Common uses

A validator answers a narrow question: will a strict parser accept this text? The rules are short and set by RFC 8259. Strings and keys use double quotes. There are no comments. The last item in an object or array has no comma after it. Numbers have no leading zeros, no leading plus sign, and a digit on both sides of a decimal point. The only bare words are true, false and null, in lower case. This page checks exactly those rules, so if it says valid, any standard JSON parser will read the text.

Most invalid JSON fails for the same handful of reasons, and each has its own message here. A comma before } or ] is usually left behind after deleting the last item. A missing comma usually sits at the end of the line above the one named, so the message says so. Single quotes and bare keys come from JavaScript object literals. Curly quotes come from pasting through a chat app or a word processor. True and None come from Python's print. A leading zero, as in a PIN like 0412, is not a valid number, and the hint suggests putting it in quotes so the zero is not lost.

Brackets that do not match are the slowest mistake to find by eye in a long file. When a { or [ is never closed, the page points at the bracket that was opened, not at the end of the file. When the closing bracket is the wrong kind, as in a list closed with }, it says which kind was expected. When there is something after a complete value, such as a second object without a comma or a stray }, it says the JSON was already finished, which usually means two documents were pasted together.

Valid is not always the same as safe to use. The page also reports duplicate keys, which RFC 8259 discourages because programs disagree on which copy wins, and integers too large for JavaScript to hold exactly. A file with a byte order mark at the start, common when saved from Windows tools, is accepted and noted, since some servers reject it. None of these notes change your data; they tell you what another program might do with it.

Private, and the limits

Validation happens on this device. The text in the box and any file you open are read in the browser tab, and no part of them is sent to TaskNinja or a third party. There is nothing to log in to and nothing is saved when you close the tab.

If you only need to know whether the JSON is valid, you can close the page once you see the result. If you copy or download the formatted output, that copy lives on your device like any other file.

Official sources

Last checked 2026-10-14.

FAQ

How do I know if my JSON is valid?
Paste it and press Format JSON. Valid JSON comes back formatted with a Valid JSON line. Invalid JSON shows the line, column and reason instead.
Why does the error point at the line below my missing comma?
The parser only notices the comma is missing when the next item starts. The message tells you to look at the end of the line above.
Are comments allowed in JSON?
No. Standard JSON has no comments. Some tools accept them in config files, but a strict parser will not. Fix mistakes can remove them for you.
Is a trailing comma valid JSON?
No. A comma after the last item in an object or list is an error in JSON, even though JavaScript allows it.
Does it validate against a JSON Schema?
Not yet. It checks that the text is valid JSON and reports duplicate keys and unsafe numbers, but not whether fields match a schema.
Is anything I paste sent to a server?
No. The check runs in your browser tab, and the text is not uploaded or stored.

Related tools

Guide: how to format and validate JSON without uploading itJSON formatter and beautifierAll toolsGuides on the blog