JSON Formatter
Format, minify, and validate JSON data
1. What is JSON?
JSON (JavaScript Object Notation) is a lightweight data interchange format. It's easy for humans to read and write, and easy for machines to parse and generate. This tool helps you format (prettify), minify, and validate JSON data.
2. How does it work?
Formatting vs Minifying
Formatting (prettifying) makes JSON more readable by adding indentation and line breaks. Minifying removes all unnecessary whitespace to reduce file size. Both operations validate the JSON syntax and report errors if found.
Common JSON Errors
- Missing commas between properties
- Trailing commas (not allowed in JSON)
- Single quotes instead of double quotes
- Unquoted property names
- Comments (not allowed in standard JSON)
JSON Data Types
- String: "text"
- Number: 123 or 123.45
- Boolean: true or false
- Null: null
- Array: [1, 2, 3]
- Object: {"key": "value"}
3. Examples
Simple object
{"name":"John","age":30,"city":"New York"}Array
[1,2,3,4,5]Nested structure
{"user":{"name":"Jane","profile":{"age":25,"email":"[email protected]"}}}