Skip to content
Tezmy Tools

JSON Minifier

Remove spaces and line breaks from JSON to make it as small as possible

82 → 57 characters (25 fewer, 30% smaller).

Runs in your browser. Nothing is uploaded.

About the JSON Minifier

Pretty-printed JSON is easy for people to read but carries a lot of spaces and line breaks that a program does not need. Minifying removes them, so the same data takes up less space in a request, a config file or a database field. Paste your JSON and the compact version appears at once, along with a count of how many characters you saved. The tool reads the JSON first, so a mistake is reported instead of being squeezed into a broken result. Strings are untouched, including the spaces inside them. It runs in your browser and nothing is uploaded.

Updated October 2026

How to use the JSON Minifier

  1. 1Paste your JSON into the left box.
  2. 2The minified version appears on the right.
  3. 3Check the saving shown under the box.
  4. 4If an error appears, fix the JSON and it will be minified again.
  5. 5Copy the result or download it as a .json file.

Why minify JSON

Smaller JSON means less data to send and store. For a single file the saving is small, but for an API that returns thousands of responses a day or a page that embeds a large data block, it adds up. Minified JSON also fits on one line, which suits log files, environment variables and fields in a form or database.

It is not meant to be read by people. Keep the formatted version in your source files and minify only the copy you ship.

    Minify, then check

    Because the tool reads the JSON before writing it, a successful minify is also a quick proof that the JSON is valid. If you want the opposite, to make compact JSON easy to read again, paste it into the JSON Formatter on this site.

    • Formatter: makes it readable
    • Minifier: makes it small
    • Validator: finds mistakes

    Things to know

    Numbers keep their value, but the way they are written may be normalised, for example 1.0 is written as 1. Very large integers beyond the range that JavaScript handles exactly may lose precision in any browser-based tool, so check such values before you rely on them. Duplicate keys inside an object are merged, with the last value winning.

      Common places to use it

      Embedding configuration in a data attribute, sending a short body to an API, saving a compact fixture in a test, storing settings in one database cell or pasting a payload into a chat message all work better with the minified form. XML data has its own smaller form in the XML Minifier, and the JSON Formatter brings the readable layout back when you need to read it.

        Features

        • Removes all unnecessary whitespace
        • Shows characters saved and the percentage
        • Checks the JSON before minifying
        • Spaces inside strings are kept
        • Copy or download
        • Private: nothing is uploaded

        Frequently asked questions

        How do I minify JSON?

        Paste the JSON into the box. The tool parses it and writes it again without indentation, spaces after colons or line breaks. Copy the compact line and use it wherever you need it.

        Does minifying change my data?

        No. Keys, values, order and strings stay the same; only the formatting whitespace is removed. Reading the minified JSON gives exactly the same data as the original.

        How much smaller will the file be?

        It depends on the indentation. Deeply nested, four-space-indented JSON often shrinks by a third or more, while JSON that was already compact saves little. The tool shows the exact number.

        What if my JSON is invalid?

        The tool tells you what is wrong rather than guessing. Typical causes are a trailing comma, single quotes around text, or a missing bracket. The JSON Validator on this site points to the exact line.

        Is minified JSON the same as compressed JSON?

        Minifying removes whitespace. Compression such as gzip works on the bytes and can be used on top, and web servers do this automatically. They can be combined for the smallest transfer.

        Is my JSON sent to a server?

        No. The minifying happens in your browser, so API responses and configuration stay on your device.

        Related tools