What is JSON? A Complete Beginner's Guide (2026)
What is JSON?
JSON (JavaScript Object Notation) is a lightweight, text-based data format used to exchange data between systems. It was originally derived from JavaScript object syntax, but is now language-independent and supported by virtually every programming language.
Why JSON took over the web
Before JSON, most web APIs used XML — a verbose, tag-heavy format. JSON's syntax is dramatically simpler, smaller over the wire, and maps directly to native data structures (objects, arrays, strings, numbers, booleans) in nearly every language.
JSON syntax in 60 seconds
JSON has six value types:
- String —
"hello"(must use double quotes) - Number —
42or3.14 - Boolean —
trueorfalse - Null —
null - Array —
[1, 2, 3] - Object —
{"key": "value"}
Common pitfalls
- No comments — JSON does not allow
//or/* */comments. - No trailing commas —
{"a": 1,}is invalid. - Keys must be quoted —
{a: 1}is invalid; use{"a": 1}. - Single quotes are not allowed — only double quotes.
Use JSONNeat's validator to catch any of these instantly.
When to use JSON
JSON is ideal for REST APIs, configuration files, NoSQL document storage, and frontend state. For binary data or extremely large datasets, formats like Protocol Buffers or Parquet may be a better fit.
Try the tools: JSON Formatter · Validator · Minifier