Analysis
100% in your browser
JSON Formatter & Validator
Format, minify, and validate JSON instantly. Detects syntax errors with precise messages. Works fully offline.
JSON Formatter & Validator
Paste any JSON into the input field to instantly validate it, format it with readable indentation, or minify it to save space. Syntax errors are reported with precise position information.
What this tool does
- Validate: checks JSON syntax as you type and reports the exact error location.
- Format: applies consistent indentation (2 spaces, 4 spaces, or tabs) to make nested structures easy to read.
- Minify: strips all whitespace to produce the smallest possible JSON string — useful before sending over a network.
Common JSON errors
- Trailing commas:
{"a":1,}is invalid — remove the comma before the closing brace. - Single quotes: JSON requires double quotes for all strings and keys.
- Unquoted keys:
{a: 1}is JavaScript, not JSON — keys must be quoted:{"a": 1}. - Comments: JSON does not support
//or/* */comments.
JSON data types
- string —
"hello" - number —
42,3.14,-1 - boolean —
trueorfalse - null —
null - array —
[1, 2, 3] - object —
{"key": "value"}