All Tools View Categories Blog About Contact Privacy

Compress Image to 20 KB

Compress any image to under 20 KB — in your browser, with nothing uploaded. The tool searches encoder quality settings to land as close to 20 KB as it can without going over, and only reduces dimensions when the target cannot be reached any other way.

Drop images here, click to browse, or paste from the clipboard
JPG · PNG · WebP · GIF · BMP · SVG  ·  as many files as you like  ·  nothing is uploaded

Everything worth knowing about the 20 KB target

What 20 KB can realistically hold, how the tool actually reaches it, which format to pick, what quality to expect, and where this budget is the right choice rather than an arbitrary one.

Compressing to 20 KB: what the number actually means

Twenty kilobytes is the point where a compressed image stops being a token and starts being a picture. It is double the budget of the tightest tier, and because image quality responds to bytes in a sharply diminishing curve, that doubling buys a disproportionate improvement — roughly 40% more linear resolution, or the same resolution with visibly fewer artifacts.

It remains a small budget in absolute terms. A photograph straight from a phone is two to four hundred times larger, so the tool still reduces dimensions on most inputs rather than relying on quality reduction alone. What changes at 20 KB is that the resulting image is comfortably large enough for avatars, list rows, card thumbnails and icon sets, and it no longer looks obviously broken when someone views it at its native size.

The tool searches for the highest quality setting that still fits under 20 KB, and only reduces dimensions when quality alone cannot get there. That ordering matters: it means you always get the largest image the budget can support rather than an arbitrarily shrunken one.

Why people choose the 20 KB target

Twenty kilobytes is usually chosen rather than imposed. It is the number people land on when 10 KB proved too aggressive and 50 KB felt wasteful for something that renders at 200 pixels. That makes it a considered budget, and it rewards a little care in setting it up: pick the output dimensions deliberately and 20 KB is genuinely comfortable.

The other route here is an avatar pipeline. If you are storing profile pictures for thousands of users, the difference between 20 KB and 200 KB each is the difference between a few hundred megabytes and a few gigabytes, replicated across every backup and every CDN edge. Avatars are displayed small and stored forever, which is precisely the profile that justifies squeezing them.

Why a target size beats a quality slider

Every image editor asks you for a quality number and then tells you the file size afterwards. That is backwards for the problem most people actually have, which is a fixed ceiling — an upload form, a page budget, a mailbox limit — and no idea which quality setting will land underneath it. The usual result is a loop: export at 70, check, export at 50, check, export at 60, give up somewhere in the middle.

This tool inverts the relationship. You give it the ceiling and it searches for the quality, using a bisection over the encoder settings that converges in a handful of attempts. That is why it can hit 20 KB reliably on the first pass, and why it can tell you afterwards exactly which quality it used — which is useful information, because it tells you how much headroom you had.

What the tool does not do

It does not upload anything, so it cannot use a server-side encoder like MozJPEG or a full WebP encoder with custom tuning. It uses the encoders built into your browser, which are good but not state of the art. It also does not perform content-aware operations — no smart cropping, no subject detection, no upscaling. And it will not make a compressed file better than its source: compressing an image that has already been through a lossy pass compounds the damage, so always start from the best original you have.

About Compress Image to 20 KB

This tool compresses any image you give it to under 20 KB, in your browser, without uploading anything. Drop in a JPG, PNG, WebP, GIF, BMP or SVG and it decodes the file, searches encoder quality settings to find the highest one that still fits inside 20 KB, and hands back the result with the exact final size, the dimensions, the quality setting it used and a fidelity score measuring how far the output has drifted from the original.

Where quality alone cannot reach 20 KB — which happens on tight budgets and very large source images — it reduces the dimensions progressively and re-encodes until the file genuinely fits, then tells you the scale factor it applied. You get the largest, cleanest image that will actually fit the target rather than a file that misses it.

Small but usable: this page covers what 20 KB can realistically hold, which formats behave best at that size, and where the budget is genuinely the right choice.

Features

  • Exact target search: Binary search across encoder quality settings to land as close to 20 KB as possible without exceeding it.
  • Automatic downscaling fallback: When quality alone cannot reach 20 KB, dimensions are reduced progressively until the file fits, with the scale factor reported.
  • Batch processing: Drop in a whole folder; every file is processed independently against the same target.
  • Format control: Auto, JPEG, WebP or PNG output, with auto choosing per file based on whether the image is photographic or has transparency.
  • Dimension limits: Set a maximum width and height and the image is fitted inside that box with its aspect ratio kept.
  • Before-and-after comparison: A draggable slider over the original and the result at full size, so you can judge the trade rather than guess at it.
  • Fidelity score: A peak signal-to-noise ratio for every file, telling you objectively how much was lost.
  • ZIP download: Take the entire batch as one archive, built in the browser with no library and no server.
  • Metadata stripped: EXIF, GPS coordinates and camera details are discarded during re-encoding, which is a privacy benefit worth knowing about.
  • Nothing uploaded: Every step runs locally through the Canvas API. The tool works with the network disconnected.

How to Use

  1. Add your images — drag them onto the drop zone, click to browse, or paste from the clipboard. Multiple files at once are fine.
  2. Check the target — it is preset to 20 KB. Lower it slightly if you are compressing to satisfy an upload limit, since some systems measure the whole request rather than the file.
  3. Pick an output format — auto is right most of the time. Choose WebP for the smallest files, JPEG for maximum compatibility, PNG for screenshots, logos and anything with text.
  4. Set maximum dimensions if it matters — capping the width is what turns a byte budget into a sharp image rather than a soft one.
  5. Compress — each file is processed and appears in the results table with its before and after size, dimensions, quality and fidelity score.
  6. Check one result — open the comparison slider on a representative image before committing to a large batch.
  7. Download — take files individually or the whole batch as a single ZIP.

Examples

Example 1 — an avatar for a member directory: A 3.1 MB portrait is compressed to 20 KB. The tool holds quality at 78% and lands on 480 × 640 in WebP at 19.4 KB, a 99.4% reduction, with a fidelity score in the high thirties — visually identical at any size the directory displays.

Example 2 — twenty category tiles: Twenty landscape photographs are dropped in together with the maximum width set to 400. Each lands between 15 and 20 KB, the batch drops from 46 MB to 380 KB, and the whole set downloads as one ZIP.

Example 3 — a transparent badge: A PNG badge with a transparent background is compressed with the format left on WebP so the alpha channel survives. It lands at 6 KB with no visible change, where a JPEG conversion would have added an unwanted white box behind it.

Benefits

  • Hit the number first time: No exporting at quality 60, checking the size, exporting again at 45. The tool searches for you.
  • Pass upload limits that reject camera files: A phone photo is many times over a 20 KB cap; this closes the gap in one step.
  • Keep as much quality as the budget allows: Quality is reduced before dimensions, so you never lose resolution unnecessarily.
  • Judge the trade honestly: A comparison slider and an objective fidelity score instead of a vague promise about quality.
  • Process a folder in one pass: Batch compression with a per-file report and a single ZIP download.
  • Keep your images private: Nothing is uploaded, nothing is stored, and the tool works offline.
  • Strip location data automatically: Re-encoding removes EXIF and GPS, which matters when sharing photographs publicly.
  • Free, with no account and no watermark.

Frequently Asked Questions

What resolution can I expect at 20 KB?
For an ordinary photograph in WebP, roughly 500 × 380 pixels; for a detailed one, closer to 360 × 270. JPEG comes in about 25% smaller in each dimension for the same budget. Flat graphics and simple images go considerably larger. The table on this page gives the full breakdown.
Is 20 KB good enough for a profile photo?
Yes, for almost every interface. Avatars are typically rendered between 32 and 256 pixels, and 20 KB comfortably covers a clean image at the top of that range. The only case where it falls short is a profile page that displays the same file at full width.
Why is 20 KB so much better than 10 KB?
Because image quality follows a diminishing-returns curve. The first kilobytes buy structure, the last buy fine texture. Doubling from 10 to 20 KB sits early on that curve, where each additional kilobyte is still doing a lot of work, so the improvement is much larger than the doubling suggests.
Can I keep the original dimensions?
Set a maximum width and height and the tool will respect them, but if the target cannot be met at that size the output will miss 20 KB. Turn strict mode off if you would rather have the original dimensions at whatever size the encoder can manage, and on if hitting the target is the hard requirement.
Does the tool work on transparent PNGs?
Yes. If you convert to JPEG, which has no alpha channel, transparency is flattened onto the background colour you choose — white by default. WebP keeps transparency, so choose WebP or PNG if the transparent areas matter.
How do I compress a whole folder?
Select or drag in every file at once. Each is compressed independently against the same 20 KB target, the results table shows what each one needed, and the ZIP button packages the entire batch in a single download.
Does compression happen on your servers?
No. All decoding, resizing and re-encoding runs in your browser. Nothing is uploaded, nothing is logged, and the page continues to work if you disconnect from the network after it loads.
What is the fidelity score in the results?
It is a peak signal-to-noise ratio, a standard measure of how far the compressed image has drifted from the original. Above about 35 dB the difference is usually invisible; between 28 and 35 it is noticeable on close inspection; below 28 it is obvious.
My file came out well under 20 KB. Why not use the full budget?
Because the tool searches for the highest quality that fits and encoders move in discrete steps. If the next quality step up would have exceeded the target, it stops at the one below. Raising the maximum dimensions is usually the better way to use up spare budget.
Which browsers does this work in?
Every current desktop and mobile browser. WebP output requires a browser from 2020 or later, which in practice means all of them; if yours cannot produce WebP, the tool falls back to JPEG automatically.

More Image Tools

View All