TonySkill

JSON formatter

Make JSON readable with clean indentation, or minify it onto one line. Optional key sorting, errors pinpointed to the line. Nothing is uploaded.

Accepted: JSON, CSV, TSV, XML, YAML, YML, TXT, GEOJSON, JSONC · Max 50 MB per file

Processed on your device — nothing is uploaded.

Tip: paste text anywhere on the page (Ctrl+V).

How to format JSON

  1. Paste your JSON or drop the file.

  2. Pick the indentation (2 or 4 spaces, tab) or the minified version, and key sorting.

  3. Copy the formatted JSON or download it.

Why use this tool

Clean indentation
2 or 4 spaces or tabs. In XML, comments, CDATA and mixed content (text and tags together) are kept as they are.
Errors explained
A missing comma, a badly closed tag, wrong indentation: the line and column are shown, the line is highlighted and “Go to error” puts the cursor there.
Minification
Compact onto a single line to slim down a file or embed it in code. The downloaded file name ends in .min.
Nothing leaves your device
The conversion runs in your browser: your data is never sent to a server, even 50 MB files.

More data tools