Format runs JSON.stringify with a 2-space indent. Minify runs JSON.stringify with no indent. Validate only parses. Invalid input does not rewrite the output box.
Runs in your browser. Nothing you enter is uploaded.
| Format | { "hello": "world", "list": [ 1, 2, 3 ] } |
|---|---|
| Minify | {"hello":"world","list":[1,2,3]} |
| Validate | Status "Valid JSON" and the output box is left as it was |
| Format, Minify, or Validate | Status starts with "Invalid JSON: " and the output box is not replaced |
|---|
The rest of the message is the browser's own JSON.parse error. Keys must be in double quotes.
| Button | What it writes |
|---|---|
| Format | JSON.stringify(value, null, 2) |
| Minify | JSON.stringify(value) |
| Validate | No new text. Status only. |
| Copy | The output box, or the input if the output is empty |
Paste any JSON and this tool instantly formats it with clean indentation, or flags exactly where it breaks. A JSON formatter turns a dense, single-line blob into a readable, indented structure so you can scan nested objects and arrays at a glance. Essential when debugging API responses or config files. It also works as a validator: if your JSON has a stray comma, unquoted key or missing bracket, you get a clear error instead of a silent failure. Everything runs locally in your browser, so even sensitive payloads never touch a server. Use the buttons to beautify with 2-space indent, minify to a compact single line, or validate without changing anything.
Two. That is the third argument to JSON.stringify.
A pretty-printed object with "hello" and a "list" array of 1, 2 and 3, each on its own indented line.
No. JSON.parse rejects it, and this page reports Invalid JSON.
No. Parsing and formatting run in the browser.
Give your verdict. Sign-in needed to vote and comment.
Link this tool from a README, doc or site. The badge links back to this page.
[](https://yourhack.ai/json-formatter)