Skip to content
Devlar

Runs in your browser. Your input stays on your device.

JSON Validator

Check whether your JSON is valid. When it is not, see the line and column, the code around the problem, and a hint for common mistakes. Valid JSON gets a structure summary plus warnings for duplicate keys and unsafe numbers.

Opens a file from your device. The file is read in your browser and is not uploaded.

0 characters · 0 B

Privacy: This tool runs in your browser. Your input is processed on your device and is never uploaded to a server.

How to use

  1. Paste the JSON you want to check into the JSON input box. Load valid example and Load invalid example show what each kind of result looks like.
  2. Select Validate, or press Ctrl+Enter (Cmd+Enter on a Mac) anywhere in the tool, not only in the input box. Press ? to see all keyboard shortcuts.
  3. If the JSON is invalid, read the message and the code excerpt below it. The ^ marker points at the exact column, and Go to error puts your cursor there.
  4. Fix that problem and validate again. Only the first error is reported, because one mistake can make everything after it look broken.
  5. Once the JSON is valid, review the summary and any warnings about duplicate keys or numbers that JavaScript would round.

Example

An array with a trailing comma, and the report the validator gives for it.

Input
JSON
{
  "name": "Example Widget",
  "price": 19.99,
  "tags": ["tools", "hardware",],
  "inStock": true
}
Output
Invalid JSON at line 4, column 31
Trailing comma before ']'. JSON does not allow a comma after the last item.

2 |   "name": "Example Widget",
3 |   "price": 19.99,
4 |   "tags": ["tools", "hardware",],
  |                               ^
5 |   "inStock": true
6 | }

Hint: Remove the comma after the last item. JSON does not allow a comma before } or ].

Frequently asked questions

What counts as valid JSON?

Input that follows the JSON standard, RFC 8259: strings and property names in double quotes, commas only between items, no comments, and values limited to objects, arrays, strings, numbers, true, false, and null. This tool checks syntax. It does not check your data against a JSON Schema.

Why warn about duplicate keys if the JSON is valid?

The standard does not forbid repeating a key inside one object, so the document still passes. In practice most parsers, including JavaScript’s JSON.parse, keep only the last value and silently throw the others away, which can hide a real bug. The warning lists the path of every repeated key so you can decide which value should stay.

What does the large number warning mean?

JavaScript stores every number as a 64-bit floating point value, which holds whole numbers exactly only up to 9,007,199,254,740,991. Bigger integers, such as some database IDs, are rounded when a browser or Node.js parses them. The warning shows each affected path, the number as written, and the value JavaScript would actually read. Sending such values as strings avoids the problem.

Why is only one error shown at a time?

After the first mistake, a parser can only guess what the author meant, so anything it reported beyond that point would often be wrong or confusing. Fix the reported error, validate again, and repeat until the JSON passes.

JSON Formatter

Format and beautify JSON with your choice of indentation, and find syntax errors by line and column.

JSON Minifier

Shrink JSON by removing whitespace without changing any values, and see how much smaller it gets.

CSV to JSON Converter

Convert CSV or TSV to JSON with delimiter detection, header handling, and optional, lossless type detection.

Keyboard shortcuts

Run the tool, from anywhere in it
Ctrl+Enter
Show this list (outside text fields)
?
Close this list
Esc