JSON Formatter
Pretty-print JSON locally in your browser. Nothing is uploaded.
Tip: press Ctrl+Enter (or ⌘+Enter on Mac) in the input area to format.
Format JSON online, privately
Use this JSON formatter online to pretty print JSON with two-space indentation, minify a payload, or validate JSON syntax. Pretty printing lays the same data out so it is easier to read—useful for API responses, package.json, and copied logs. Minifying strips whitespace for a shorter copy. Validation checks the text and, when it parses, shows that readable preview.
The tool accepts strict JSON only. Comments and trailing commas are rejected, and a parse error includes a line, column, and a short snippet near the break. You can format JSON in the browser: it uses JSON.parse on your machine and is not uploaded. Copy the result or download it as a .json file.
Common questions
Can I format JSON with comments?
No. Comments and trailing commas are not valid standard JSON, so parsing fails. Remove them, then format again.
Does the formatter upload my JSON?
No. Formatting, minifying, and validation run in your browser. The JSON you paste is not uploaded for processing.
What is the difference between formatting and minifying JSON?
Formatting pretty prints JSON with two-space indentation so it is easier to read. Minifying removes that whitespace and keeps the same values. Both need valid JSON.
Related tools
- JSON
JSON Minifier
Remove whitespace from JSON without changing its structure.
Coming soon