What Is JSON? A Plain-English Guide

JSON — short for JavaScript Object Notation — is a text format for storing and exchanging data. When an app requests data from a server, when a program saves its settings, when two services talk to each other: the odds are the data traveling between them is JSON. It has become the default data language of the web because it is simple enough for a person to read and strict enough for a machine to parse reliably.

What JSON looks like

Here is a complete JSON document describing a user:

{
  "name": "Ada Lovelace",
  "age": 36,
  "isAdmin": true,
  "skills": ["mathematics", "analysis"],
  "address": {
    "city": "London",
    "country": "UK"
  },
  "nickname": null
}

Even without knowing the rules you can read it: a user named Ada, 36, an admin, with two skills and a London address. That readability is by design.

The six value types

Everything in JSON is one of six kinds of value:

  1. Strings — text in double quotes: "London"
  2. Numbers — integers or decimals, no quotes: 36, 3.14
  3. Booleanstrue or false
  4. null — the deliberate absence of a value
  5. Arrays — ordered lists in square brackets: ["a", "b"]
  6. Objects — collections of key–value pairs in curly braces, where every key is a quoted string

Arrays and objects can nest inside each other to any depth, which is how a handful of rules manages to describe everything from a config file to an entire product catalog.

The rules that make it strict

JSON’s strictness is what makes it dependable, and it is where newcomers stumble. Keys and strings must use double quotes — never single. Items are separated by commas, but a comma after the last item is an error. Comments are not allowed at all. And values like undefined or NaN, familiar from JavaScript, are not legal JSON. If a document breaks any of these rules, parsers reject it outright — there is no “almost valid.” (Our guide to fixing common JSON errors walks through each failure with examples.)

Where you'll meet JSON

APIs are the big one: nearly every web and mobile app fetches its data as JSON from a server. Configuration files are a close second — package.json in every JavaScript project, editor settings, app manifests. Data storage and export round it out: document databases like MongoDB store JSON-like records, and most SaaS products export your data as JSON. Log pipelines, webhooks and message queues speak it too.

JSON vs a JavaScript object

Despite the name, JSON is not JavaScript — it is a language-independent text format that happens to borrow JavaScript’s literal syntax. The practical differences: JSON requires quoted keys, allows only the six value types above, and is always text that must be parsed (JSON.parse) before use. Every major language — Python, Java, Go, Rust, PHP, Ruby — ships a JSON parser, which is precisely why it works so well as a common tongue between systems. Where formats like XML and YAML fit alongside it is covered in JSON vs XML vs YAML.

Try it yourself

The fastest way to build intuition is to look at real JSON. Paste any API response into the JSON Viewer to explore its structure as a collapsible tree, or run it through the JSON Formatter to turn a minified wall of text into readable, indented output. If you write some by hand, the JSON Validator will tell you immediately whether you got the rules right — and point at the exact line if you didn’t.