What Is JSON and How to Format It (Beautify vs Minify)
JSON is a text format for structured data. Learn how to beautify and minify it, the most common syntax errors, and how to validate JSON in your browser.
JSON (JavaScript Object Notation) is a lightweight text format for structured data, used by almost every web API. Formatting it means adding indentation and line breaks so it is readable — for example turning {"name":"Ada","age":36} into neatly indented lines.
The building blocks
- Objects in curly braces:
{ "key": "value" } - Arrays in square brackets:
[1, 2, 3] - Values: string, number, boolean, null, object or array
Keys must be double-quoted strings, and there is no trailing comma after the last item.
Beautify vs minify
- Beautify adds whitespace so humans can read and debug the data.
- Minify strips all optional whitespace to shrink the payload for faster transfer.
You switch between the two without changing the data itself.
Common errors
- A trailing comma after the last array or object item
- Single quotes instead of double quotes
- Missing a closing brace or bracket
- Unescaped quotes inside a string
Format and validate instantly
Paste your data into the JSON formatter to beautify, minify and catch syntax errors as you type — all in your browser, nothing uploaded. Converting a spreadsheet? Try CSV to JSON. Related: Image to Base64.