August 6, 2026
JSON Syntax Rules
JSON Syntax Rules
JSON is famous for being simple, but it is also very strict. A single misplaced character will invalidate the entire file.
The Golden Rules
- Data is in name/value pairs.
- Data is separated by commas.
- Curly braces hold objects.
- Square brackets hold arrays.
- Strings must use double quotes.
- Keys must be strings (and therefore in double quotes).
Valid Data Types
JSON values must be one of the following data types:
- String:
"Hello World" - Number:
42or3.14(no quotes) - Object:
{"key": "value"} - Array:
[1, 2, 3] - Boolean:
trueorfalse(no quotes) - Null:
null(no quotes)
Note: JSON does not support undefined, functions, or dates natively.
Check if your JSON follows these rules using our JSON Validator.
