JSON Formatter

Paste messy or minified JSON and get it neatly indented — with the exact line and column of any error.

How to format JSON

  1. Paste JSON in the left box, drop a .json file, or click Try an example.
  2. The formatted version appears on the right as you type. Choose 2 spaces, 4 spaces or tabs, and Sort keys if you like.
  3. Copy or Download the result.

Better than most formatters

Private, even for API responses

Online formatters often send what you paste to their server. Here it is formatted in your browser, so API responses with tokens or customer data stay on your machine. Need it as a table? JSON to CSV.

Private by design

The JSON never leaves your browser. Paste API responses with tokens or customer data without sending them to a server.

Troubleshooting

When to use which indent

Checking someone else's JSON for mistakes? The JSON Validator explains each error in plain English.

Frequently asked questions

How do I pretty print JSON?

Paste it in the left box; the indented version appears on the right.

Can I sort JSON keys alphabetically?

Yes. Tick Sort keys; nested objects are sorted too.

Does it change my numbers?

No. Numbers are printed exactly as written, including very long IDs.

Is my JSON uploaded?

No. Everything runs in your browser.

Can I format JSON with comments?

Yes. Tick Allow comments and trailing commas; they are removed in the result.

Does it change the order of keys?

Only when you tick Sort keys.

Runs entirely in your browser, powered by a JSON parser built for this site that keeps numbers exact. Built and tested by Diego Callegari · how we test · updated 26 October 2026.