Fast validator & beautifier

Valid/Invalid

JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write, and It is easy for machines to parse and generate. On this website you can find multiple JSON example, JSON formatter and beautifier to help you understand how to make a good JSON.

When exchanging data between a browser and a server, the data can only be text. JSON is text, and we can convert any JavaScript object into JSON, therefore send JSON to the server. See more information on Wikipedia.

Syntax

JSON data is written as name/value pairs. A name/value pair consists of a field name (in double quotes), followed by a colon, followed by a value. See next JSON example:

{ "key":"value" }

Note that, JSON names require double quotes. JavaScript names don’t, it can be strings, numbers, or identifiers. Below you can find a JSON example:

{ key:"value" }

The above JSON example is valid for JavaScript. If you need more information about how JSON works in different languages, check json.org.

See the entire explanation on the Syntax & Examples page.

What is the difference between JSON and XML?

Before, XML (extensible markup language) was the only choice for open data interchange. But over the years JSON appeared. Therefore JSON has become a popular alternative to XML for multiple reasons.

  • is shorter
  • can use arrays
  • is quicker to read and write
  • doesn’t use tags

See the entire explanation on the JSON vs XML page.