Swelıty
Tools for everyone

Free Online JSON Validator

Validate JSON syntax and structure.

JSON input

Validation result

✓ Valid JSON · Type: Object (3 keys)

How to use

  1. Paste your JSON, or open a .json or text file into the input box.

  2. Press Validate JSON.

  3. If it is valid, copy the indented copy or download it as validated.json.

  4. If it is not, read the error message, fix the input and validate again.

Why use this tool

  • Standard parser

    Uses JSON.parse, the same rules your JavaScript code applies.

  • Summary of the data

    Shows the type of the top-level value and how many keys or items it has.

  • Indented copy

    Valid JSON is shown again with two-space indentation, ready to copy or download.

About this tool

The JSON Validator checks whether a piece of text is valid JSON. It uses the browser's own JSON parser, so it follows the JSON standard strictly: names and strings need double quotes, and trailing commas, comments and single quotes are not allowed. When the text is valid, it tells you what the top level is, for example an object with 3 keys or an array with 20 items, and shows a copy indented with two spaces.

When it is not valid, you see the error your browser's parser reports. Many browsers include a position in it, though the wording differs. Common causes are a missing or extra comma, single quotes, an unquoted key, a missing bracket and a comment left in the data.

To tidy JSON and choose its layout, use the JSON Formatter, and to see how two JSON documents differ use JSON Compare.

Frequently asked questions

The message comes from your browser. Many browsers include a position, or a line and column, but the wording and detail differ from one browser to another.

A comma after the last item, single quotes instead of double quotes, names without quotes, comments, and values such as undefined or NaN, which JSON does not have.

No. It checks the syntax only, not whether the right fields are present or have the right types.

This tool is for a quick yes or no with a summary. The JSON Formatter is for laying out or minifying JSON, and the JSON Viewer shows it as a tree.

Not always. Whole numbers beyond about 9 quadrillion lose precision when JavaScript reads them, so the indented copy can differ. Keep such IDs as strings.

Paste it into the box. The tool says at once whether it is valid and, if not, shows the error message from your browser's parser.

The parser found a character that JSON does not allow at that point. The usual causes are a trailing comma, single quotes instead of double quotes, an unquoted key or a comment.