Skip to content
Toolseta
Runs in your browser

JSON Formatter

Beautify or minify JSON with syntax validation and configurable indentation.

Result

About JSON Formatter

Paste minified or messy JSON and get a clean, indented version you can read and diff. The formatter also minifies JSON for payloads, can sort object keys alphabetically and points to the exact line and column of any syntax error.

How it works

  1. 1

    Paste JSON into the input box or drop a .json file on it.

  2. 2

    Choose indentation, or minify, and optionally sort keys.

  3. 3

    Copy the result or download it as a .json file.

Frequently asked questions

Is my JSON sent to a server?

No. Formatting happens entirely in your browser with JavaScript, so API responses, secrets and customer data never leave your device.

How large can the JSON be?

Several megabytes work comfortably. The limit is your browser's memory, not our servers.

Why does it say my JSON is invalid?

Common causes are trailing commas, single quotes instead of double quotes, unquoted keys and comments. The error message shows the line and column where parsing stopped.