About this tool
A JSON validator checks that text follows the JSON specification: double-quoted keys and strings, no trailing commas, matching brackets and valid values. This checker parses your input as you type and reports the exact position of the first syntax error, then shows a neatly formatted version of valid data.
What is a JSON checker?
A JSON checker, also called a JSON validator, reads your text and confirms it follows the JSON standard (RFC 8259). When it does not, the checker tells you where parsing failed, so you can fix the problem instead of guessing.
This checker validates as you type, shows the line and column of the first error, marks that line in the line-number gutter, and displays a clean formatted version when the JSON is valid. Everything runs in your browser, so your data is not uploaded.
Common JSON errors and how to fix them
Most invalid JSON comes from a short list of mistakes. Here is each one with its fix.
Trailing comma {"a": 1,} -> {"a": 1}
Single quotes {'a': 1} -> {"a": 1}
Unquoted key {a: 1} -> {"a": 1}
Missing comma {"a": 1 "b": 2} -> {"a": 1, "b": 2}
Comment {"a": 1 // note} -> remove the comment
Unclosed bracket {"a": [1, 2} -> {"a": [1, 2]}What does "Unexpected token" mean in JSON?
"Unexpected token" means the parser found a character that is not allowed at that position. It is usually a stray comma, a quote of the wrong type, or text outside the braces. The line and column shown in the red status bar point to that character.
"Unexpected end of JSON input" means the text stops too early, most often because a closing bracket, brace or quote is missing.
JSON syntax rules at a glance
Data is written as name and value pairs inside curly braces, and every name must be a string in double quotes.
A value can be a string, number, true, false, null, an object or an array. Strings must use double quotes, never single quotes.
Items are separated by commas, with no comma after the last item. Comments and undefined values are not allowed in standard JSON.
How to use it
- Paste your JSON, or open a .json file from your device.
- A green bar means the JSON is valid. A red bar gives the line and column of the first error.
- Click the red bar to jump the cursor to the problem, fix it, and the result updates instantly.
Frequently asked questions
What is JSON?
JSON (JavaScript Object Notation) is a lightweight text format for exchanging data between servers, apps and configuration files. It uses objects in curly braces, arrays in square brackets, strings, numbers, booleans and null.
What are the most common JSON errors?
Trailing commas after the last item, single quotes instead of double quotes, unquoted keys, missing commas between items, and unmatched brackets. Standard JSON does not allow comments.
Is my data uploaded?
No. Validation runs entirely in your browser, so your JSON never leaves your device.