WebToolsPlanet
Developer Tools

JSON Cheat Sheet

Everything you need to know about JSON syntax — data types, structure rules, escaping, and common patterns — in one quick reference.

Last updated: May 21, 2026

Client-Side Processing
Input Data Stays on Device
Instant Local Execution

Find this tool useful? Support the project to keep it free!

Buy me a coffee

What is JSON Cheat Sheet?

JSON (JavaScript Object Notation) is the universal data interchange format used by REST APIs, configuration files, and databases. It is simple but strict: no comments, no trailing commas, only double-quoted strings, and only six data types.

This cheat sheet covers all JSON syntax rules, data types with examples, nesting patterns, string escaping sequences, and common mistakes that cause parse errors.

How to Use JSON Cheat Sheet

Browse the sections or use Ctrl+F to find a specific topic. Each entry shows the syntax with a concrete example. For validation and formatting, use the JSON Validator and JSON Formatter tools.

Common Use Cases

  • Developers building or consuming REST APIs who need a quick syntax reminder.
  • Students learning JSON for the first time who want a structured reference.
  • Developers debugging JSON parse errors who want to check escaping rules.
  • DevOps engineers writing JSON configuration files who need a quick lookup.

Example Input and Output

A JSON object demonstrating all six data types.

JSON structure
{
  "name": "Alice",
  "age": 30,
  "active": true,
  "score": null,
  "tags": ["admin", "user"],
  "address": { "city": "London" }
}
Data types shown
string, number, boolean, null, array, object

Tip: use a validator

When a JSON parse error is hard to find, paste into the JSON Validator tool — it reports the exact line and column of the syntax error.

Frequently Asked Questions

Can JSON have comments?
No. Standard JSON does not support comments. If you need comments in configuration files, consider JSONC (JSON with Comments), JSON5, or YAML instead. Parsers that accept JSON will throw on // or /* */ comments.
Why must strings use double quotes?
The JSON specification (RFC 8259) mandates double quotes for strings. Single-quoted strings are invalid JSON — this is a frequent source of parse errors when copying values from JavaScript code.