Skip to content

JSON Minifier

In-browser only Keeps every value exact Shows bytes saved

Which tool?Format make it readableMinify smallest sizeLint syntax check, strict rules and duplicate keys

The result appears here once you enter JSON.
Runs entirely in your browser — your JSON never leaves this page.

Overview

Shrink JSON to its smallest size, losslessly

Strip every byte of unnecessary whitespace from JSON. See the original size, the minified size, and exactly how much you saved.

Guide

How to use

  1. 1
    Paste your JSON

    Type, paste, or use the Paste button to pull JSON from your clipboard. The Sample button loads a small example to try.

  2. 2
    Read the savings

    The original size, minified size, and percentage saved appear above the compact output.

  3. 3
    Check the output

    Only whitespace between tokens is removed. If the JSON is broken, you see the line and column of the problem instead.

  4. 4
    Copy or download

    Use Copy to send the result to your clipboard. On the Format and Minify pages you can also Download it as a .json file.

Pitfalls

Common JSON mistakes

  • Minifying broken JSON

    Minification needs valid JSON. If the input has an error, the tool shows the line and column instead of producing output.

  • Worrying about spaces inside strings

    Spaces inside "quoted strings" are data, not formatting — they are always kept. Only whitespace between tokens is removed.

  • Skipping compression

    For network transfer, enable gzip or brotli as well. Minifying first and compressing second gives the smallest payload.

  • Editing minified files by hand

    Keep a formatted copy as your source of truth and minify it for delivery — one-line JSON is hard to review and diff.

Frequently asked questions

How much smaller does JSON get when minified?
It depends on how much whitespace the input has. Pretty-printed JSON with 2-space indentation typically shrinks 20–60%. JSON that is already compact may shrink very little.
Is minified JSON still valid?
Yes. Minification only removes insignificant whitespace between tokens. Values are copied exactly as written — including large integers and duplicate keys — so any JSON parser reads the result exactly as it reads your input.
Should I also compress my JSON?
For network transfer, yes — gzip or brotli compression on top of minification typically achieves much larger total savings. Minifying first removes redundant whitespace before compression runs.
Does minifying change key order?
No. Keys stay in exactly the order they appear in your input — even numeric keys like "2" and "1", which some tools move to the front.