Paste JSON to format, validate, minify, and explore it. Interactive tree view, key sorting, error detection, and one-click conversion to CSV and YAML, all processed locally in your browser.
Explore & Convert
Click Format first, then this tab converts array-of-objects JSON to CSV.
Click Format first to see YAML output.
Click Format first to extract dot-notation key paths.
What Is a JSON Formatter?
A JSON formatter takes raw, minified, or poorly structured JSON and adds proper indentation and spacing to make it readable, while validating the syntax and pointing out any errors.
Everything runs in your browser. Your JSON is never sent to a server or stored, which makes this safe to use with API keys, database records, and other sensitive data.
Common JSON Errors
| Error | Problem | Fix |
|---|---|---|
| Trailing comma | {"a": 1, "b": 2,} | {"a": 1, "b": 2} |
| Single quotes | {'key': 'value'} | {"key": "value"} |
| Unquoted key | {key: "value"} | {"key": "value"} |
| Comment in JSON | {"a": 1 // note} | JSON has no comment syntax, remove it |
| Undefined value | {"a": undefined} | {"a": null} |
Use Fix / Repair to automatically correct trailing commas, single quotes, and unquoted keys.
JSON vs XML vs YAML
JSON is the right choice for APIs and data exchange. YAML suits configuration files since it supports comments and is easier to write by hand. CSV works best for flat tabular data destined for a spreadsheet. This tool converts JSON to both YAML and CSV.