About JSON Formatter
Paste raw or minified JSON to pretty-print it instantly. Formatting runs entirely in your browser, so payloads containing customer data, API keys or tokens are never uploaded anywhere.
Indentation and minifying
Switch between two spaces, four spaces and tabs to match your project’s conventions, or pick Minified to strip every unnecessary byte before shipping a config file or embedding JSON in a query string.
Sorting keys
Enable Sort keys to order every object’s keys alphabetically, all the way down the tree. It is the fastest way to make two API responses comparable when their fields come back in a different order.
Frequently asked questions
- Is my JSON uploaded to a server?
- No. Parsing and formatting happen in JavaScript on your own machine. The page makes no network request with your input, so it is safe for production payloads.
- Why does formatting reorder or drop my duplicate keys?
- JSON objects cannot hold duplicate keys. The parser keeps the last value it sees for a repeated key, which matches how every JSON library behaves.
- Can it handle very large files?
- Documents of a few megabytes format comfortably. Beyond that the browser has to hold the source, the parsed tree and the output in memory at once, so expect a pause.