Skip to content
Tezmy Tools

JSON Validator

Check whether JSON is valid and find the exact line and column of any error

Result
✗ Not valid JSON
Problem
A comma is followed by a closing bracket. Trailing commas aren't allowed
Where
Line 4, column 21
That line
"tags": ["a", "b",],

Runs in your browser. Nothing is uploaded.

About the JSON Validator

When a program says unexpected token or invalid JSON, it rarely says where. This validator reads your JSON strictly, the way the official format defines it, and either confirms that it is valid or points to the first problem with its line and column and shows that line. It catches the usual mistakes: a comma after the last item, single quotes instead of double quotes, unquoted keys, comments, a missing bracket or an unfinished string. For valid JSON it tells you the type at the top level and the size. Everything runs in your browser and your data is not uploaded.

Updated October 2026

How to use the JSON Validator

  1. 1Paste your JSON into the box.
  2. 2Read the result: valid, or not valid with a reason.
  3. 3If it is not valid, look at the line and column and the line shown.
  4. 4Fix the problem in your own file and paste again.
  5. 5Use the JSON Formatter next to tidy the valid JSON.

Why validate JSON

JSON is the format of web APIs, configuration files and data exports. A single misplaced character can make the whole file unusable, and the error message from a program may be vague. Validating first saves time, and a clean result tells you the problem is elsewhere, in the data or in the program using it.

The validator uses its own strict reader so that the position of the error is known, which the standard parser in a browser does not always provide.

    Reading the error

    The message names what was expected, such as a comma or a closing bracket, and what was found. Look at the line shown below it; the problem is at that spot or just before it. Fix one error at a time, because after the first error the rest of the file cannot be read.

    • Check the character before the position
    • Look for the last comma in a list
    • Make sure every opening bracket is closed

    After it is valid

    Use the JSON Formatter to indent it and make it readable, or the JSON Minifier to make it small. If your data needs a different format, the converters on this site turn JSON into CSV, XML, YAML or TSV.

      Edge cases

      Empty input is reported as an error, not as valid. A file that holds only a string, a number, true, false or null is valid JSON by the standard, and the tool reports the type accordingly. A byte order mark at the start of a file is ignored. If the error is only layout, the JSON Formatter makes the text easy to read, and the JSON Minifier shrinks it again when it is valid. If the text has stray slashes, the JSON Escape Tool fixes them before you check again.

        Features

        • Strict JSON checking
        • Line and column of the first error
        • Shows the line with the problem
        • Reports the top-level type and size
        • Catches trailing commas and single quotes
        • Private: nothing is uploaded

        Frequently asked questions

        How do I check if my JSON is valid?

        Paste it into the box. The result shows a tick and the top-level type when the JSON is valid. If it is not, you get the reason, the line and column and the text of that line.

        What are the most common JSON errors?

        A trailing comma after the last item, single quotes instead of double quotes, keys without quotes, comments, a missing closing bracket or brace, and a raw line break inside a string. All of these are invalid in standard JSON.

        Why is a trailing comma invalid?

        The JSON standard does not allow one, even though JavaScript objects do. Some parsers are lenient and accept it, but strict ones such as most APIs do not, so it is safest to remove it.

        Does it accept comments?

        No. Standard JSON has no comments. Files with comments, sometimes called JSONC, must be cleaned before a strict parser will read them.

        What does the position mean?

        The line and column show where the parser first got stuck. The real mistake is sometimes slightly earlier, for example a missing comma shows up at the start of the next key.

        Is my JSON uploaded?

        No. The check runs in your browser and your data stays on your device.

        Related tools