Where invalid JSON usually breaks
The three syntax errors you hit most often, with fixes.
1. Trailing comma after the last item
{ "name": "kim", "age": 30, }
Remove the comma after 30. Unlike JavaScript object literals, JSON does not allow a trailing comma.
2. Missing double quotes on keys
{ name: "kim" }
Keys must be wrapped in double quotes too — { "name": "kim" }. Single quotes (') are not valid either.
3. A real line break inside a string
A literal Enter inside a value breaks parsing. Escape real line breaks as \n — { "msg": "line1\nline2" }.
Beautify vs. Minify
- Beautify: pick 2-space, 4-space, or tab indentation. For reading an API response by eye, 2 spaces works well.
- Minify: strips all whitespace and line breaks. A 1.2KB pretty file drops to roughly 0.8KB — handy for network payloads or
localStorage.
Converting to other formats
You can turn JSON into YAML, CSV, or XML. YAML suits config files; CSV is the easy path into a spreadsheet.
Your data never leaves the browser
Pasted JSON is parsed entirely in the browser. JWT tokens, DB schemas, and other sensitive values are never sent to a server.
For validation rules and more use cases, see the JSON Formatter & Validator guide.