Everything You Need to Know About JavaScript Object Notation
JSON (JavaScript Object Notation) is a lightweight, text-based data format used to store and exchange structured information. It was derived from JavaScript object syntax by Douglas Crockford in the early 2000s and was formally specified as RFC 8259 in 2017. Despite its JavaScript origins, JSON is language-independent and is supported natively by virtually every modern programming language.
JSON is widely used for web data exchange; XML remains useful for document-oriented data and established XML systems. It is used by REST APIs, configuration files, databases (such as MongoDB and PostgreSQL's JSONB type), and messaging systems. Its popularity stems from a simple design philosophy: be human-readable, machine-parseable, and as minimal as possible.
Douglas Crockford identified a subset of JavaScript's literal notation that could serve as a standalone data format around 2001. He registered the domain json.org and published the grammar on a single page. The format gained rapid adoption because web developers were already familiar with the syntax from JavaScript. The first JSON RFC, RFC 4627, appeared in 2006. RFC 8259 is the current Internet Standard and permits any JSON value at the top level, including a string, number, boolean, or null.
JSON follows a small set of strict rules:
{} (objects) or as ordered lists inside square brackets [] (arrays).true/false), null, objects, or arrays.JSON supports exactly six data types:
A sequence of Unicode characters wrapped in double quotes.
An integer or floating-point number. JSON does not distinguish between int and float.
Either true or false (lowercase, unquoted).
Represents an empty or unknown value.
An ordered list of values enclosed in square brackets.
An unordered collection of key-value pairs enclosed in curly braces.
Here is a realistic JSON document combining all six data types:
You can paste this into our JSON Formatter to see it pretty-printed with syntax highlighting, or use the JSON Validator to confirm it is valid.
package.json. Some configuration formats, including VS Code settings and TypeScript configuration, permit comments or other extensions. Such files may need editing before a strict JSON validator accepts them.JSON.parse() and serialize objects with JSON.stringify(), making it ideal for client-server communication.Now that you understand JSON, try working with it using our free, browser-based tools:
Want to compare JSON with other data formats? Read our JSON vs XML vs YAML comparison guide.
JSON stands for JavaScript Object Notation. Despite the name, JSON is language-independent and is used by virtually every modern programming language, including Python, Java, C#, Go, Ruby, PHP, and many more.
No. JSON is a data format inspired by JavaScript object syntax, but it is a standalone specification (RFC 8259). JSON is stricter than JavaScript: it requires double quotes for strings and keys, does not allow comments, and does not support functions or undefined values.
JSON supports six data types: strings (text in double quotes), numbers (integers and decimals), booleans (true or false), null, arrays (ordered lists in square brackets), and objects (key-value pairs in curly braces).
JSON is popular because it is lightweight, human-readable, and natively supported by JavaScript (the language of the web). It is simpler than XML, requires less markup, and is easy to parse in every major programming language. Its suitability still depends on the API contract and data model; XML and other formats remain useful.
Sources: RFC 8259. Technical content reviewed .