Guide · Updated 2026-07-29

What is JSON?

JSON (JavaScript Object Notation) is a lightweight, text-based format for representing structured data. It's the most common way modern applications exchange and store data — here's what that means in practice.

JSON, defined simply

JSON stands for JavaScript Object Notation. It was derived from JavaScript's object literal syntax, but despite the name, it isn't tied to JavaScript — every major programming language can read and write it. JSON represents data as a combination of just a few building blocks: objects (key-value pairs in curly braces), arrays (ordered lists in square brackets), strings, numbers, booleans (true/false), and null. That's the entire vocabulary, which is exactly why it's so easy to parse and so widely supported.

A basic JSON example

{
  "name": "Ada Lovelace",
  "born": 1815,
  "isProgrammer": true,
  "languages": ["Analytical Engine notes"],
  "spouse": null
}

Each key is a quoted string, each value is one of JSON's basic types, and objects/arrays can nest inside each other to represent arbitrarily complex data — a list of objects, an object containing arrays, and so on.

JSON vs. XML

Before JSON became dominant, XML was the standard for structured data exchange. XML uses opening and closing tags (<name>Ada</name>), which is more verbose than JSON's "name": "Ada". JSON is also a closer match to how most programming languages already represent data in memory (objects and arrays), so it typically requires less code to parse and generate. XML still has advantages for documents with mixed content and attributes, but for API responses and configuration data, JSON has become the default choice.

Where JSON is used

JSON is the standard response format for the overwhelming majority of web APIs — when a browser or app fetches data from a server, it's almost always getting JSON back. It's also used for application and package configuration files (many JavaScript, Python, and other project files are JSON), for NoSQL databases like MongoDB that store documents natively in JSON-like form, and for simple local data storage in browsers and apps.

JSON syntax rules worth knowing

A few rules trip people up because they're valid in JavaScript but not in strict JSON: object keys must be double-quoted strings (not single-quoted, not unquoted), and a comma can never follow the last item in an object or array. These are exactly the errors a JSON validator will catch instantly, with the line and column of the problem.

Frequently asked questions

What does JSON stand for?

JSON stands for JavaScript Object Notation. Despite the name, it's a language-independent data format used by nearly every modern programming language, not just JavaScript.

Is JSON a programming language?

No. JSON is a data format, not a programming language — it has no functions, loops, or logic, only a way to represent structured values like objects, arrays, strings, numbers, booleans, and null.

What is the difference between JSON and XML?

Both represent structured data, but JSON uses a more compact syntax with no closing tags, making it faster to parse and easier to read. XML uses tags and supports attributes and namespaces, which JSON does not.

Who created JSON?

JSON was specified by Douglas Crockford in the early 2000s, based on a subset of JavaScript's object literal syntax, and later formalized as the international standard RFC 8259 and ECMA-404.

Where is JSON used?

JSON is the standard format for web API responses, application configuration files, NoSQL databases like MongoDB, browser localStorage, and data interchange between almost any two modern systems.