JSON Formatter
Developer ToolsBeautify, minify, and validate JSON in the browser.
Calculated Result
Valid JSON
Formula: JSON.parse → JSON.stringify
About this calculator
Paste an API payload or config. Pretty mode uses two-space indent. Minify drops whitespace. Invalid JSON shows the parser error.
How It Works & Formula
FormulaJSON.parse then JSON.stringify(value, null, indent)
JSON.parse reads the text. JSON.stringify writes it back with or without indent.
Frequently Asked Questions
Does invalid JSON get uploaded for linting?
No. JSON.parse runs in this tab. You only see the browser’s error message.
Can I minify as well as pretty-print?
Yes. Pretty uses two-space indent. Minify is JSON.stringify without whitespace.