JSONHack
Validator · Formatter · Base64
Beginner Guide

What is JSON?

📅Last updated:

JSON (JavaScript Object Notation) is a lightweight, text-based data format used to store and exchange data between applications, APIs, and services. It is human-readable, easy to write, and supported natively by virtually every modern programming language — making it the universal language of data exchange on the web.

Why JSON Is So Popular

JSON Structure Explained

A JSON document is built from two fundamental structures: objects and arrays.

JSON Object

An object is a collection of key-value pairs enclosed in curly braces. Keys must be strings (in double quotes), and values can be any valid JSON type.

{
  "name": "Alice",
  "age": 30,
  "isActive": true
}

JSON Array

An array is an ordered list of values enclosed in square brackets. Values can be of any type, including other objects or arrays.

[
  "apple",
  "mango",
  "banana"
]

Nested JSON

JSON supports nesting — objects can contain arrays, and arrays can contain objects, allowing complex data structures.

{
  "user": {
    "name": "Bob",
    "skills": ["JavaScript", "Python"],
    "address": {
      "city": "New York",
      "zip": "10001"
    }
  }
}

JSON Data Types

String

Text enclosed in double quotes. Example: "Hello World"

Number

Integer or floating-point. Example: 42 or 3.14

Boolean

Either true or false (lowercase, no quotes)

null

Represents an empty or absent value: null

Object

A collection of key-value pairs: {"key": "value"}

Array

An ordered list of values: [1, 2, 3]

Common JSON Errors to Avoid

Use our JSON Validator to catch these errors instantly, or read the full guide on Common JSON Errors.

JSON vs Other Formats

JSON is often compared to XML and YAML. JSON wins on simplicity and performance for most web use cases. Read our detailed JSON vs XML comparison to understand the differences.

How to Work With JSON Online

JSONHack provides a complete set of free browser-based JSON tools:

For a step-by-step walkthrough, see How to Format JSON Online.

Try the JSON Formatter now

Paste your JSON and format, validate, or minify it instantly — free and private.

Open JSON Tool →