JSON stands for JavaScript Object Notation. It is a lightweight, text-based data interchange format that is easy for humans to read and write, and easy for machines to parse and generate. Despite its name, JSON is language-independent and is supported by virtually every modern programming language.
Need to format or validate a JSON document?
Open JSON Formatter →JSON was developed by Douglas Crockford in the early 2000s as a simpler alternative to XML for transmitting data between a server and a web application. It was first described in 2001 and later standardized as ECMA-404 and RFC 8259. Today it is the dominant format for web APIs and configuration files worldwide.
A JSON value is either an object, an array, a string, a number, a boolean, or null. An object is a set of key-value pairs enclosed in curly braces, where keys must be strings in double quotes. An array is an ordered list of values enclosed in square brackets.
{
"name": "Alice",
"age": 30,
"active": true,
"score": 9.5,
"tags": ["developer", "designer"],
"address": {
"city": "Istanbul",
"country": "Turkey"
},
"nickname": null
}
JSON supports exactly six value types:
"Hello, World!"42, 3.14, -7true or falsenull{"key": "value"}[1, "two", true]package.json), VS Code, and many other tools use JSON for settingslocalStorageBefore JSON, XML was the dominant format for data exchange. JSON has largely replaced XML in web development because:
XML is still preferred when document structure, namespaces, comments, or schemas (XSD) are required.
0 itself)NaN and Infinity are not valid JSON valuesJSON (JavaScript Object Notation) is a lightweight, text-based data interchange format that is easy for humans to read and write and easy for machines to parse and generate. It is the most widely used format for web APIs and configuration files.
JSON stands for JavaScript Object Notation. Despite its name, JSON is language-independent and supported by virtually every modern programming language.
JSON is used for data exchange in web APIs, application configuration files (such as package.json), data storage in NoSQL databases like MongoDB, and communication between services over HTTP.
A JSON file is a plain-text file with a .json extension that contains structured data in JSON format. It can be opened and edited with any text editor.
JSON is shorter and easier to read than XML, requires less bandwidth and parses faster, and is natively supported in JavaScript. XML is still preferred when document structure, namespaces or schemas (XSD) are required.