JSON formatter
Pretty-print, minify and validate JSON. Errors point to the problem.
Indent
Result
Pretty-print, minify, and validate JSON. Errors point to the problem line. Runs entirely in your browser.
Frequently asked questions
- What is JSON?
- JSON (JavaScript Object Notation) is a lightweight data-interchange format that uses human-readable text to store data as key-value pairs.
- What is the difference between formatting and minifying JSON?
- Formatting (pretty-printing) adds whitespace and indentation to make JSON readable by humans. Minifying removes all unnecessary whitespace to reduce file size.
- Why does the formatter show an error?
- JSON has strict syntax rules. Common causes: trailing commas, single-quoted strings, or unquoted keys — all valid in JavaScript but not in JSON.