Developer Tools

What Is JSON? A Beginner’s Guide

Learn what JSON is, how its syntax works, and where it's used, with simple examples of JSON objects, arrays, and data types.

Brekzy Team Published September 7, 2026 Updated September 8, 2026

On this page
  1. What Does JSON Stand For?
  2. What Does JSON Look Like?
  3. JSON Data Types
  4. JSON Objects and Arrays
  5. JSON Syntax Rules
  6. Where Is JSON Used?
  7. JSON vs XML
  8. How to Validate and Format JSON

JSON stands for JavaScript Object Notation. It’s a lightweight, text-based format for storing and exchanging structured data, and it’s become the standard way most modern applications send data back and forth.

What Does JSON Stand For?

JSON stands for JavaScript Object Notation. The name comes from the fact that its syntax is based on how objects are written in JavaScript. Despite the name, JSON isn’t tied to JavaScript: it’s a plain text format that almost every modern programming language can read and write, including Python, PHP, Java, Ruby, and Go.

What Does JSON Look Like?

Here’s a simple JSON object describing a person:

{
  "name": "John",
  "age": 30,
  "city": "London"
}

This is an object, shown by the curly braces { }. Inside it are three key-value pairs. Each key (like "name") is a label written in double quotes, followed by a colon and its value (like "John"). Pairs are separated by commas.

JSON Data Types

JSON supports a small, fixed set of value types:

  • String: text wrapped in double quotes, e.g. "London"
  • Number: written without quotes, e.g. 30
  • Boolean: either true or false
  • Array: an ordered list of values in square brackets
  • Object: a set of key-value pairs in curly braces
  • null: represents an intentionally empty value

JSON Objects and Arrays

An object groups related values under named keys. An array is an ordered list of values, written in square brackets and separated by commas:

["Apple", "Banana", "Orange"]

Objects and arrays can be combined and nested inside each other. Here’s a more realistic example:

{
  "name": "John",
  "age": 30,
  "isEmployed": true,
  "address": {
    "city": "London",
    "postcode": "E1 6AN"
  },
  "hobbies": ["reading", "cycling", "chess"]
}

Here, address is an object nested inside the outer object, and hobbies is an array of strings. Nesting is what lets JSON represent complex, real-world data.

JSON Syntax Rules

  • Keys must be strings, written in double quotes (not single quotes).
  • String values must also use double quotes.
  • Commas separate items, but standard JSON does not allow a trailing comma after the last item in an object or array.
  • Numbers, true, false, and null are written without quotes.
  • Every opening brace or bracket needs a matching closing one.

Breaking any of these rules produces invalid JSON that most parsers will reject.

Where Is JSON Used?

  • APIs: most web APIs send and receive data as JSON.
  • Web applications: browsers and servers exchange JSON behind the scenes.
  • Configuration files: many tools and frameworks store settings as JSON.
  • Data storage: some databases store records directly as JSON documents.
  • JavaScript applications: JSON maps directly onto JavaScript objects, making it a natural fit.

JSON vs XML

Before JSON became dominant, XML was the standard format for exchanging structured data. Both can represent the same information:

JSON XML
{"name": "John", "age": 30}
<person>
  <name>John</name>
  <age>30</age>
</person>

JSON is generally more compact and easier to read at a glance, which is part of why it overtook XML for most web APIs. XML supports some things JSON doesn’t natively, like attributes and comments, and is still common in document formats and older enterprise systems. Neither format is universally “better”: the right choice depends on what a system already uses and needs.

How to Validate and Format JSON

Hand-written JSON is easy to get wrong: a missing comma or an extra bracket is enough to break it. The JSON Formatter & Validator checks your JSON for syntax errors and points out exactly where the problem is, and can also reformat cramped or minified JSON into a readable, indented layout. If you’re moving data between formats, the JSON to CSV Converter and CSV to JSON Converter tools convert JSON and CSV in either direction.

JSON often shows up alongside other data-handling concepts. If your data needs to travel through binary-unsafe channels, see What Is Base64 Encoding?; if it’s being placed into a URL, see What Is URL Encoding?; and if you need to search or validate JSON string values, see Regex Explained for Beginners.

Try it yourself

JSON Formatter & Validator

Try our JSON Formatter & Validator →

Frequently Asked Questions

What does JSON stand for?

JSON stands for JavaScript Object Notation. It describes the syntax the format uses, not a programming language.

Is JSON a programming language?

No. JSON is a data format, not a programming language. It has no logic, functions, or instructions; it only describes data using objects, arrays, and a small set of value types.

What is JSON used for?

JSON is most commonly used to exchange data between a server and a client, such as an API sending data to a web or mobile app. It’s also used for configuration files and, in some databases, for storing records directly.

What is the difference between JSON and XML?

Both formats represent structured data, but JSON uses a more compact syntax based on objects and arrays, while XML uses nested tags similar to HTML. JSON is generally easier to read and parse, while XML supports additional features like attributes and comments.

Can JSON contain arrays?

Yes. Arrays are one of JSON’s core data types, written in square brackets. An array can hold strings, numbers, objects, other arrays, or a mix of these.

Why must JSON use double quotes?

The JSON specification requires double quotes for strings and keys. Single quotes are not valid JSON, even though some programming languages (including JavaScript itself) allow them for strings in their own code.

Explore More

Find the right tool, or keep reading Brekzy's other guides.