JSON Formatter
Format, minify and validate JSON, with syntax errors pinned to the exact line.
About this tool
JSON shows up everywhere in day-to-day development: API responses, config files, log payloads, webhook bodies. Most of it arrives minified into one unreadable line. This JSON formatter does three things — expands that line into indented, readable structure, compresses it back down when you need the smallest possible payload, and tells you which line and column broke when a parser rejects it.
Minifying is the same operation in reverse, and the saving is larger than people expect: indented JSON is often 20–30% whitespace, and the counter tells you exactly how many characters came off. It is worth doing for anything sent over the wire — API payloads, config bundled into a build, values stuffed into an environment variable or a URL. It is worth not doing for files kept in version control, where collapsing everything onto one line turns every future diff into a single unreadable changed line.
Unlike most online JSON tools, there is no upload step. Parsing, validation and formatting all run in JavaScript on your own machine, so pasting a production response full of real customer records or an API key never sends it anywhere. Once the page has loaded you can disconnect from the network and it keeps working. It is faster, too: with no round trip to a server, large files format the moment you click.
Frequently asked questions
Is my JSON data uploaded to a server?
No. Formatting, minifying and validation all happen in JavaScript inside your browser, so the data never leaves your device and no network request is made. You can verify it yourself: load the page, disconnect from the network, and keep using it normally. Everything still works, because there is no server involved.
How large a JSON file can it handle?
The limit is your browser memory, not a server upload cap. JSON files in the tens of megabytes format without trouble on a typical laptop; beyond that, split the file first. Because nothing is uploaded, large files usually process faster here than on tools that send your data to a backend and wait for a response.
Why does my JSON show a syntax error when it looks correct?
The error message points at the exact line and column. The three most common causes are a trailing comma after the last item, strings wrapped in single quotes, and object keys without double quotes. All three are legal in a JavaScript object literal but rejected by the strict JSON spec every parser follows.
My long ID numbers changed after minifying. Why?
Because JSON numbers are parsed as double-precision floats, which hold about 15–16 significant digits. An ID like 12345678901234567890 comes back as 12345678901234567000 — the tail is gone, and no JSON tool in a browser can avoid this. It bites database bigint IDs and snowflake IDs in particular. The fix is upstream: send those values as strings, which every API that has been burned by this now does.
Does minifying still help if my server already uses gzip?
Less than you would guess, but not nothing. Gzip is very good at compressing runs of repeated whitespace, so most of what minifying removes is something gzip was already handling cheaply. The remaining gain is real but small. Minify because it is free and the payload is smaller before compression too — not because it will transform your transfer times.
Does minifying change my data in any other way?
The structure and key order are preserved, but numbers are re-written in their canonical form: 1.0 becomes 1, 1e3 becomes 1000, and 1.50 becomes 1.5. If the same key appears twice, the last one wins and the earlier one disappears — which is also what every JSON parser does, so the duplicate was already being ignored somewhere downstream.
What is the difference between formatting and minifying JSON?
Formatting adds indentation and line breaks so the structure is readable and easy to debug. Minifying strips every optional space and newline to cut transfer size, which matters for API payloads and config bundles. Both hold identical data, so you can convert back and forth as often as you like without losing anything.