Skip to content

JSON Formatter

Format, minify and validate JSON instantly — 0, 2 or 4 space indent.

Preparing the tool…
No file selected

How to format JSON

  1. Paste your JSON

    Paste the text or drop a .json file — it stays on your device.

  2. Choose indentation

    Pick 2 or 4 spaces to pretty-print, or 0 to minify.

  3. Copy or download

    Grab the formatted JSON or save it as a .json file.

Frequently asked questions

How do I format JSON?

Paste your JSON into the text area or load a .json file, pick an indent of 0, 2 or 4 spaces, and the formatted result appears immediately.

What happens with invalid JSON?

The parser reports the error instead of guessing. JSON5, trailing commas, single quotes and comments are all rejected because they are not valid JSON.

Can I minify JSON too?

Yes. Choosing 0 indentation removes all insignificant whitespace, producing compact JSON ideal for storage or API payloads.

Is my JSON sent to a server?

No. Parsing and re-serializing happen entirely in your browser — nothing is uploaded, logged or stored.

Strict JSON formatting

Here is what each format is for, and when converting messy JSON into readable form is the right move.

What is Raw JSON?

The single-line, machine-written JSON from API logs, config dumps and minified bundles — valid, but nearly impossible to read or diff by eye.

What is Formatted JSON?

The same data re-serialized with consistent indentation and key order preserved, ready to read, edit, review in a diff or commit to a repo.

When you need it

Use it to inspect API responses, tidy config files before editing, and produce readable diffs. It is a strict validator: if your source uses comments or trailing commas, fix those first — the tool will not silently rewrite invalid JSON.

Your file tools, one click away

Install ToolMink to open it from your desktop or home screen.