Developer Guides

JSON Formatting Explained: Beautify, Validate and Minify

A quick guide to reading, fixing and compressing JSON — with the most common syntax errors and how to fix them.

JSON Formatting Explained: Beautify, Validate and Minify
On this page
  1. What is JSON?
  2. The 5 most common JSON errors
  3. Beautify vs. minify

What is JSON?

JSON (JavaScript Object Notation) is a lightweight text format for exchanging data between systems. APIs, config files and databases all speak JSON.

The 5 most common JSON errors

  1. Trailing commas after the last item.
  2. Single quotes instead of double quotes.
  3. Unquoted property names.
  4. Comments (JSON does not allow them).
  5. Missing brackets or braces.
{
  "name": "ToolCMB",
  "private": true,
  "tools": ["json-formatter", "base64-encoder"]
}

Beautify vs. minify

Beautifying adds indentation so humans can read it. Minifying removes all whitespace to reduce size for production. Our JSON Formatter does both locally in your browser.

Written by ToolCMB Team

We build fast, free and private browser tools — and write practical guides on how to use them.