100% FREE  -  NO SIGN-UP  -  YOUR FILES NEVER LEAVE YOUR DEVICE

JSON Minifier

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.

100% free, no premium plan No sign-up Files never leave your device
Drop your text here
or click to choose a file from your device

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.

    How the JSON Minifier works

    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.

    1. Paste your JSON or drop a .json file into the box.
    2. Watch the single line output build live.
    3. Check the size line to see the before size, the after size and the percentage saved.
    4. Copy the minified JSON or download it as a file.

    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.

    When a JSON Minifier is the right tool

    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.

    JSON Minifier rules and honest limits

    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.

    Your JSON stays in your browser

    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.

    FAQs

    What exactly does minifying remove?

    Only insignificant whitespace: the spaces, tabs and line breaks between tokens that indentation adds. Keys, values and punctuation all stay, in the same order.

    How much size will I save?

    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.

    Is minified JSON the same as compressed JSON?

    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.

    Can I turn minified JSON back into readable JSON?

    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.

    What if my JSON has an error in it?

    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.

    Is my JSON uploaded to a server?

    No. The minifier runs in your browser on your own device. Nothing you paste is sent anywhere or stored by ToolPeko.

    More Developer Tools

    Same rules as this one: free, in your browser, with nothing uploaded.

    Scroll to Top