What is JSON?
JSON (JavaScript Object Notation) is a lightweight text format for storing and exchanging structured data. It uses human-readable objects and arrays, which is why APIs, config files, and logs overwhelmingly prefer it.
JSON (JavaScript Object Notation) is a lightweight text format for storing and exchanging structured data. It uses human-readable objects and arrays, which is why APIs, config files, and logs overwhelmingly prefer it.
A JSON document is plain text built from two structures - objects (key-value pairs in braces) and arrays (ordered lists in brackets) - plus four primitive value types. Almost every language ships a JSON parser, so data written once can be read anywhere.
{
"name": "Ada Lovelace",
"id": 1024,
"verified": true,
"nickname": null,
"roles": ["admin", "editor"],
"address": {
"city": "London",
"zip": "E1 6AN"
}
}This one object shows everything: a string, a number, a boolean, a null, an array of strings, and a nested object. Real API responses are the same shapes at larger scale.
JSON won over XML for APIs because it maps directly onto the data structures programming languages already have - no schemas, namespaces, or closing-tag ceremony. Against YAML, JSON trades writability for predictability: no indentation traps, no surprising type coercions, and parsers that behave identically everywhere.
| JSON | XML | YAML | |
|---|---|---|---|
| Verbosity | Low | High | Lowest |
| Comments | No | Yes | Yes |
| Schema tooling | JSON Schema | XSD | JSON Schema |
| Best fit | APIs, configs, logs | Documents, legacy SOAP | Hand-written configs |
Paste any JSON into the visualizer to read it as inline blocks with visible data types.
Run suspicious input through the validator to pinpoint syntax errors.
Use the formatter to pretty-print minified payloads before reading them.
JavaScript Object Notation. Despite the name, it is language-independent: Python, Go, Rust, Java, and every other mainstream language parse and generate JSON natively.
No. JSON is a data format with no logic, functions, or comments. It describes values only, which is what makes it safe to exchange between systems.
Any single JSON value: usually an object or array, but a bare string, number, boolean, or null is also technically valid. Most APIs return an object envelope.