{ } JSON Workbench0 network requests. Check DevTools

What is JSON?

JSON (JavaScript Object Notation) is a lightweight, text-based format for storing and exchanging structured data. It is easy for people to read and write, and easy for machines to parse and generate. JSON is the most common format for sending data between a server and a web or mobile app, and for configuration files. Despite the name, it is language-independent: almost every programming language can read and write it.

JSON in simple terms

Think of JSON as a way to write down data as plain text using two familiar building blocks: a list of key/value pairs (an object), and an ordered list(an array). Values can be text, numbers, true/false, nothing (null), or more objects and arrays nested inside. That is the whole idea: a simple, predictable text shape that any program can turn back into data.

A JSON example

Here is a small JSON object describing a user:

{
  "id": 42,
  "name": "Ada Lovelace",
  "active": true,
  "roles": ["admin", "editor"],
  "address": {
    "city": "London",
    "zip": "SW1A 1AA"
  },
  "lastLogin": null
}

The whole thing is one object (wrapped in { }). Inside it are keys ("id", "name") each paired with a value"roles" holds an array ([ ]), and "address"  holds another nested object. Paste an example like this into the JSON Viewer to explore it as a collapsible tree.

JSON syntax rules

If your text breaks these rules (single quotes, trailing commas, comments), it is not strictly valid. The JSON Validator shows the exact error, and the JSON Formatter can auto-repair common mistakes.

JSON data types

JSON supports exactly six types of value:

There is no date, currency, or "undefined" type. Dates are conventionally stored as ISO strings like "2026-07-08T10:00:00Z".

Where JSON is used

JSON vs XML

JSON and XML both structure data as text, but JSON is more compact and maps directly onto the objects and arrays of modern programming languages, which is why it has largely replaced XML for web APIs. XML is more verbose and supports attributes, namespaces, and comments. You can convert between them with XML to JSON and JSON to XML.

Working with JSON

Every tool on this site runs entirely in your browser, so your data never leaves your machine. Common next steps:

Frequently asked questions

What does JSON stand for?

JSON stands for JavaScript Object Notation. It is a lightweight, text-based format for storing and exchanging structured data, and despite the name it is language-independent.

Is JSON a programming language?

No. JSON is a data format, not a language. It has no logic, functions, or execution: it only describes data as text, which programs in any language can read and write.

What is the difference between JSON and a JavaScript object?

A JavaScript object lives in memory and can hold functions and any type; JSON is a text string with a strict subset of that syntax (double-quoted keys, no functions, no trailing commas, no comments). You convert between them with JSON.parse and JSON.stringify.

What data types does JSON support?

Six: string, number, boolean (true/false), null, array, and object. There is no date, integer-vs-float distinction, or undefined; dates are usually stored as strings.

What is a .json file?

A plain-text file containing a single JSON value, saved with the .json extension. You can open it in any text editor or a JSON viewer. See how to open a JSON file for step-by-step instructions.