Strip the whitespace out of JSON and watch the size drop live, with before and after sizes and the percentage saved. It runs in your browser, nothing uploads.
Your files are processed in your browser, on your own device. Nothing is uploaded to a server.
A JSON Minifier removes the spaces, line breaks and indentation from JSON so the same data takes up less room. Paste pretty printed JSON and the minified single line version appears live, with the before and after sizes and the percentage saved. It is free and runs in your browser, with no upload.
Paste JSON into the box and the minified output builds as you type. Only the whitespace between tokens is removed. Keys, values, punctuation and the order of everything stay where they were. The size line under the output shows how big the input was, how big the result is, and the share you saved.
The live update makes the size line worth watching. Add a deeply indented block and you see the saving grow, which gives you a feel for how much of a file was spacing rather than data. If the input will not parse, you get the parser error instead of a minified result, so broken JSON never comes out the other end dressed as finished work.
Data that travels is the main case. A JSON file embedded in a page, stored in a database field, packed into a config value or sent inside another payload all cost less room in minified form. The saving on an indented file is real, and it repeats every time that data is stored or sent.
Fixtures and snapshots are a quieter case. Test data kept in a repo reads better one record per line in minified form when a test fails and prints the whole value. Minified JSON also makes two payloads easy to compare, since a diff tool sees one long line each instead of hundreds of short ones, and the first difference stands out.
There is a flip side, and it is worth saying on this page. Minified JSON is miserable to read. Keep the pretty version as your source of truth, minify the copy that travels, and use the JSON Formatter when you need the readable form back.
Minifying is not compression. This tool removes whitespace, and that is all it removes. A format like gzip shrinks data far more by finding repeated patterns, and servers apply it to pretty and minified JSON alike. Expect the saving here to track how much indentation your file carried. A file formatted with 4 space indents and short lines can shed a large share of its size. A file that was already compact will barely change, and the size line will tell you so honestly.
Very long whole numbers deserve the same caution they get everywhere in JSON work. Browsers handle JSON numbers as standard double precision values, so an integer longer than about 16 digits can shift when tools parse it. If your data carries long ID numbers, compare a few in the output before the minified version goes anywhere important.
One more reading note. A minified file has no line structure, so an error message from some other tool that names a line number will not help you locate a problem inside it. Debug the pretty version, then minify again once it checks out in the JSON Validator.
The minifying runs on your device. Your JSON is not sent to a server, not stored by ToolPeko and not read by anyone here. Close the tab and the text is gone. There is no account, no daily cap and no run limit, and the same goes for every other tool on this site.
Only insignificant whitespace: the spaces, tabs and line breaks between tokens that indentation adds. Keys, values and punctuation all stay, in the same order.
It depends on how the file was formatted. Heavily indented JSON can lose a large share of its size. JSON that is already compact will hardly change. The size line on the page shows your exact before and after numbers and the percentage.
No. Minifying removes whitespace only. Compression formats like gzip shrink data much further by pattern matching, and they work on minified JSON too. The two steps stack.
Yes. Paste the minified line into the JSON Formatter on this site and pick an indent. The readable version rebuilds right away, because minifying never changed the data itself.
You see the parser error message instead of a minified result. Fix the input, and the output builds again. The error position is easier to read in the JSON Validator.
No. The minifier runs in your browser on your own device. Nothing you paste is sent anywhere or stored by ToolPeko.
Same rules as this one: free, in your browser, with nothing uploaded.
Paste messy JSON, get it neat and valid.
Check JSON and find the exact line that breaks it.
Open JSON as a tree you can fold and explore.
JSON rows turned into a CSV a spreadsheet can open.
A CSV file turned into clean JSON objects.
JSON rewritten as YAML for config files.
YAML config turned into JSON you can use in code.
Indent messy XML so its structure makes sense.