Skip to content
Guides6 min read

What is JSON? A developer's introduction

Understand the JSON data format, its history, and why it dominates modern APIs and configuration files.

By JSON Formatter Team

A quick definition

JSON — short for JavaScript Object Notation — is a lightweight, text-based data format used to exchange structured data between systems. Despite its name, JSON is language-independent: every major programming language ships a JSON parser today.

Why JSON became the default

JSON grew popular for three reasons: it is easy for humans to read, trivial for machines to parse, and maps naturally onto the primitive types almost every language already has — strings, numbers, booleans, null, arrays and objects.

That combination made JSON the natural successor to XML for web APIs. Where XML required verbose tags and separate parsing libraries, JSON is literally a subset of JavaScript object literals.

The six data types

JSON defines exactly six value types:

Objects

Unordered collections of key/value pairs wrapped in {}. Keys must be strings.

Arrays

Ordered lists of values wrapped in [].

Strings

Unicode text wrapped in double quotes. Backslash escapes such as \n, \t and \u00e9 are supported.

Numbers

Integer or floating-point, decimal notation. No NaN, no Infinity, no leading zeros.

Booleans

Exactly the lowercase literals true and false.

null

The single literal null.

What JSON deliberately leaves out

There are no comments, no trailing commas, no functions, no dates and no undefined. This minimalism is a feature — every parser agrees on what a valid document looks like.

Where to go next

Try the JSON Formatter to beautify a sample, then read the common JSON errors guide to learn how to fix the mistakes you'll inevitably hit.