JSON Minifier

JSON Minifier removes every unnecessary space, tab and line break from your JSON, collapsing it into the smallest possible single-line form. The data is identical — only the formatting is gone.

Minifying is what you want before sending JSON over the network or embedding it in code, where every byte counts. The tool also shows how much smaller the result is.

Input
Minified
Minified JSON appears here.

How to use JSON Minifier

  1. 1

    Paste your JSON

    Drop formatted or messy JSON into the input box.

  2. 2

    Get the minified output

    The compact, single-line version appears instantly with its size reduction.

  3. 3

    Copy it

    Use the copy button to grab the minified JSON.

Why minify JSON?

Minified JSON travels faster and costs less to store. Removing whitespace can shrink a payload noticeably, which matters for API responses, configuration shipped to the browser, and anything sent over a metered or slow connection.

Because minification only removes insignificant whitespace, it is completely lossless: parsing the minified output yields exactly the same value as the original.

Minify vs gzip

Minifying and gzip compression are complementary. Minifying removes whitespace at the text level; gzip then compresses the bytes further on the wire. Most servers gzip automatically, but minifying first still helps, especially for payloads embedded directly in HTML or JavaScript.

To reverse the process and make minified JSON readable again, use a JSON pretty printer or formatter.

Frequently asked questions

Does minifying change my data?
No. Only insignificant whitespace is removed. The parsed value is identical to the original.
Can I un-minify JSON?
Yes — paste the minified JSON into a JSON pretty printer or formatter to add indentation back.
Is invalid JSON minified anyway?
No. The tool parses your input first, so malformed JSON shows an error instead of producing broken output.

Last updated: