Back to tools

JSON formatter

Format, minify, and validate JSON.

Mode

Indent

Output

JSON is parsed and re-serialised in this browser tab. Nothing is uploaded.

How it works

1. Paste JSON

Paste a JSON document — an API response, a config file, a blob you found in a log.

2. Pick a mode

Pick an indent (2, 4, or tab) for pretty-print, or switch to minify for a one-liner. Validate-only also reports where parsing fails.

3. Copy or download

Copy the result, or download it as a .json file. Nothing is sent to a server.

About the JSON Formatter tool

The JSON Formatter pretty-prints, minifies, and validates JSON entirely in your browser. Paste an API response, a config file, or a blob you pulled from a log, then choose an indent style — two spaces, four spaces, or tabs — to format it for readability, or switch to minify to collapse it into a single compact line. When the JSON is invalid, the validator reports the exact line and column where parsing fails, so you can jump straight to the missing bracket or stray comma instead of hunting for it.

It is an everyday tool for developers reading API payloads, cleaning up exported data, shrinking JSON for transport, or sanity-checking a configuration file. Because parsing and re-serialising use the browser's native JSON engine, your data never leaves your device, there are no size limits beyond your tab's memory, and the formatter works offline after the first load. The result can be copied or downloaded as a .json file. Free, no signup, and no telemetry on the documents you paste.

Frequently asked questions

Does my JSON leave my device?

No. JSON is parsed and re-serialised inside the browser with the standard `JSON.parse` / `JSON.stringify`. Nothing is uploaded.

Where does the error come from?

When parsing fails, the error message reports a character position. The formatter translates that into the line and column inside your input so you can jump straight to the offending bracket.

Does it work offline?

Yes — the page works offline after the first load. The whole formatter is a few KB of JavaScript.