Text Tools
JSON Validator
Paste or type JSON to validate it and view its structure.
Valid JSON
Paste valid JSON to see its type, structure, and nesting depth. Formatting is not required.
Text Tools
Paste or type JSON to validate it and view its structure.
Valid JSON
Paste valid JSON to see its type, structure, and nesting depth. Formatting is not required.
JSON (JavaScript Object Notation) is a lightweight text format for storing and exchanging data using key-value pairs and arrays. A JSON validator is a parser that checks whether your JSON conforms to official specifications—properly quoted strings, matched braces and brackets, correct comma placement, and valid data types (strings, numbers, booleans, null, objects, and arrays).
The validator parses your JSON text character by character, tracking open and close brackets, verifying string delimiters, and confirming each value is a valid type. When it finds an error—a missing quote, an extra comma, or a mismatched brace—it stops and reports the exact line and character position. Valid JSON passes silently; invalid JSON displays the error and location so you can fix it immediately.
| Input | Result | Notes |
|---|---|---|
| {"name": "Alice", "age": 28, "active": true} | Valid JSON | All strings are quoted, braces are matched, comma placement is correct, and data types (string, number, boolean) are valid. |
| {"name": Alice, "age": 28} | Invalid: string value not quoted at line 1, position 10 | The value Alice must be quoted as "Alice" because it is a string, not a boolean or constant. |
| {"items": [1, 2, 3,]} | Invalid: trailing comma in array at line 1, position 18 | JSON does not allow trailing commas after the last element in arrays or objects. |
Valid JSON follows the official spec: all strings are double-quoted, all braces and brackets are matched, commas separate items, and values are strings, numbers, booleans, null, arrays, or objects. Invalid JSON has syntax errors like missing quotes, unmatched braces, trailing commas, or forbidden single quotes.
No, standard JSON does not support comments or trailing commas. If you need comments, use JSONC (JSON with Comments) or store metadata in separate fields. Some frameworks accept trailing commas in development but strip them before sending, so the validator will reject them to match the official spec.
Common causes are unquoted string values, single quotes instead of double quotes, missing or extra commas, unmatched braces, and invisible characters (tabs, extra spaces) pasted from poorly formatted sources. The validator reports the exact line and position—check that location first.
Yes, this validator runs in your browser and does not send your JSON to any server. Your data stays on your device—nothing is logged, stored, or transmitted.
Yes, {} and [] are both valid JSON. Empty objects, arrays, and null are all valid values. Only invalid syntax or data type errors will be flagged.
This validator handles most file sizes, but extremely large JSON files (many megabytes) may slow down checking. For production use, consider server-side validation libraries like jsonschema (Python) or joi (Node.js) for performance and schema checking.