🗂 JSON Formatter

JSON Formatter & Validator

Validate, prettify, minify or sort keys. Invalid JSON gets a specific error rather than a silent failure.

📥 JSON Input0 chars
📤 Output
Output will appear here...
Paste JSON and click an action
Minified input example:
{"name":"Alice","scores":[95,87,91],"active":true}
Prettified output:
{
  "name": "Alice",
  "scores": [95, 87, 91],
  "active": true
}
Verify it yourself. Open DevTools (F12), switch to the Network tab and use the tool. Nothing appears — the readout in the header counts first-party requests made since this page loaded, and using a tool makes none.

The errors you will actually hit

Nearly every JSON parse failure is one of four things: a trailing comma after the last item, single quotes where double quotes are required, an unescaped double quote inside a string, or a stray control character pasted in from a terminal. JSON has no comments and no trailing commas — both are legal in JavaScript, which is why hand-edited config files break so reliably.

API responses are not safe to paste anywhere

The JSON people most often need to format is a captured API response, and those routinely carry bearer tokens in headers, customer records in the body, and internal hostnames in the metadata. A formatter that round-trips through a server puts all of it into someone else's logs. This one parses with the browser's own JSON.parse and re-serialises in the page, so a production payload stays on your machine.

Advertisement

Common questions

Why does my JSON fail to parse?

Most often a trailing comma, single instead of double quotes, an unescaped quote inside a string, or comments — which JSON does not allow.

What does Sort Keys do?

Reorders object keys alphabetically, which makes two payloads far easier to diff against each other.

Is my payload sent to a server?

No. Parsing and formatting use the browser's built-in JSON functions and run entirely in the page.