Developer
JSON Formatter
Beautify, validate, and minify JSON — nothing you paste ever leaves your browser, which matters since API responses often carry tokens or private data.
Your JSON
Paste minified API output, a config file, or a log line of JSON and get it back readable, with your choice of 2-space, 4-space, or tab indentation. Invalid JSON doesn't just show a generic error — the exact line and column are surfaced and highlighted directly in the editor's gutter, so fixing a stray comma or missing quote takes seconds instead of a manual scan. Valid JSON can also be viewed as a collapsible tree for exploring deeply nested structures, or minified down to the smallest possible payload. Because developers often paste API responses containing auth tokens, user records, or internal config here, everything runs locally in your browser's JavaScript engine — nothing is ever uploaded.
Related Tools
How to Use
- 1
Paste or type JSON into the editor.
- 2
Valid JSON shows Beautify and Minify output below, plus a Tree view toggle — pick 2-space, 4-space, or tab indentation.
- 3
Invalid JSON shows the exact line and column of the syntax error, highlighted in the gutter.
- 4
Click Copy to grab the formatted, minified, or tree-viewed result.
Frequently Asked Questions
Is my JSON uploaded anywhere?
No. Parsing, formatting, and validation all run locally using your browser's JavaScript engine — nothing you paste is ever sent to a server. That matters since API responses and config files often carry tokens, keys, or user data.
How does the error line number work?
When JSON.parse fails, the browser's error message is translated into a line and column number and highlighted directly in the editor's line-number gutter, so you can jump straight to the problem instead of scanning the whole document.
What's the difference between Beautify and Minify?
Beautify re-indents the JSON with your chosen indentation (2 spaces, 4 spaces, or a tab) and line breaks for readability. Minify strips all non-essential whitespace to produce the smallest possible output — useful for shrinking a payload before sending it somewhere.
What does the tree view show?
Tree view renders valid JSON as a collapsible outline — objects and arrays can be expanded or collapsed individually, which is often faster for exploring a large or deeply nested payload than scrolling through raw text.
Is there a size limit?
No hard limit — it's bounded only by your browser's available memory, since parsing and formatting happen entirely on your device.