What Is JSON? The Data Format, Explained Simply
JSON stands for JavaScript Object Notation. It is a text format for storing and sending structured data — the lists, records and settings that programs pass back and forth. When your phone app loads your messages, when a website saves your preferences, or when one server talks to another, the data on the wire is very often JSON.
Its job is simple: take data that lives in a program's memory and write it as plain text that any other program, in any language, can read back into its own memory. Because it is just text, you can open it in any editor, paste it into a tool like the JSON Formatter, and read it yourself.
A first example
Here is a small JSON document describing a user:
{
"name": "Ada Lovelace",
"active": true,
"logins": 42,
"roles": ["admin", "editor"],
"address": {
"city": "London",
"zip": "W1A"
},
"middleName": null
}
Even if you have never seen JSON before, you can probably read it. That readability is the whole point. Paste it into the formatter and press Format to see it laid out cleanly.
The two containers: objects and arrays
Almost all JSON is built from just two structures:
- Objects — wrapped in curly braces
{ }. An object is a set of key/value pairs, like a labelled record. The key is always a double-quoted string ("name"), followed by a colon, followed by a value. - Arrays — wrapped in square brackets
[ ]. An array is an ordered list of values, separated by commas. Therolesfield above is an array of two strings.
Objects and arrays can be nested inside each other to any depth — an array of objects, an object whose values are arrays, and so on. That nesting is how JSON represents real-world data of any shape.
The six value types
A JSON value is exactly one of these:
- String — text in double quotes:
"hello". - Number — an integer or decimal, no quotes:
42,0.75,-3. - Boolean —
trueorfalse. - null — the explicit "no value".
- Object —
{ }as above. - Array —
[ ]as above.
That is the entire type system. There are no dates, no functions, no comments — anything more complex (a timestamp, for example) is stored as one of these basic types, usually a string like "2026-06-14".
Why is JSON everywhere?
JSON won out over older formats for a few practical reasons:
- It is human-readable — you can debug it by eye.
- It is language-neutral — despite the "JavaScript" in the name, every major language can read and write it.
- It is compact — far less ceremony than XML, the format it largely replaced.
- It maps cleanly onto data structures — objects become dictionaries/maps, arrays become lists, in nearly every language.
Got some JSON to tidy up or check? Format, validate and minify it instantly — nothing leaves your browser.
Open the JSON FormatterThe catch: JSON is strict
The flip side of being readable by every language is that JSON is unforgiving about syntax. Keys must be double-quoted, you cannot leave a trailing comma after the last item, and comments are not allowed. Those rules are exactly what makes JSON reliable — and they are worth understanding, which is the subject of why JSON needs a strict format. For the practical do's and don'ts, see JSON formatting rules and the errors that break parsers.