Compress image to 20KB

The target is already set. Add your image and the encoder finds the best quality that fits under 20 KB.

  • Free forever
  • No signup
  • Files never uploaded
  • No watermark
  • Unlimited files

20 KB compressor

JPG, PNG and WebP files are accepted. Paste from clipboard with Ctrl+V (Cmd+V on a Mac).

Compression mode

This page is fixed to target-size mode at 20 KB. The encoder searches for the highest quality that fits under the limit, and the results table reports the size it actually reached. You can still change the target below, and every other setting is yours.

Adjust this if you need something other than 20 KB. If the limit cannot be reached at the current pixel dimensions, the row says so rather than handing you an oversized file.

Keep the original format, or convert on the way out to compare which one is smallest.

  • Removes camera model, timestamps and GPS coordinates. Also saves a few kilobytes, which matters at small targets.

  • Turn this off to let the tool shrink the image when quality alone cannot meet the target. At very small targets this is usually necessary.

Ready. Add a file to begin.

Results

Target size mode · JPEG output · 0 files

No files yet. Results will appear in this table as soon as you add one.

Your files are processed by your own browser. Nothing is uploaded to a server, so nothing can be stored, read or shared.

More tools

Other tools on this site

Each one runs in the browser the same way, with no upload and no account.

  • Compress JPEG

    Shrink JPG and JPEG photos with a quality slider or an exact target size in kilobytes.

    Compress JPEG
  • Compress PNG

    Reduce PNG screenshots and graphics while keeping transparency and hard edges intact.

    Compress PNG
  • Compress WebP

    Re-encode WebP images at a lower quality, or convert JPEG and PNG into WebP.

    Compress WebP
  • Resize Image

    Change pixel dimensions by width, height or percentage, with the aspect ratio locked.

    Resize an image
  • JPG to PDF

    Combine several photos into one PDF, reorder the pages and choose paper size and margin.

    Build a PDF
  • Document Editor

    Write a formatted document in the browser and export it to PDF, DOCX or HTML.

    Open the editor

Specification

Technical specification

Every capability written out as text, including the ones where the answer is no. A specification that only listed the wins would not be worth reading.

Technical specification — what this tool supports, attribute by attribute.
AttributeThis tool
Supported input formatsJPG and JPEG
Output formatsJPEG, PNG, WebP
Compression typeLossyJPEG discards detail permanently by design. PNG output is lossless but far larger for photographs.
Quality controlAdjustable, 10 to 100Maps directly to the encoder's quality setting. Moving it genuinely changes the output.
Exact output file sizeYes — target in KBThe encoder searches for the highest quality that fits under your limit, then reports the size it actually reached.
Resize / image dimensionsYes — max width and heightAspect ratio preserved. The resizer page adds exact pixel and percentage modes.
Batch / bulk processingUnlimitedFiles are encoded in parallel across a Web Worker pool and can be downloaded as one ZIP.
Maximum file sizeNo limit set by this siteBounded in practice by your device's memory, since each image is held uncompressed while it is processed.
EXIF and metadataStripped by defaultCamera model, timestamps and GPS coordinates are removed. You can switch it off.
Transparency / alpha channelNot applicable to JPEGJPEG has no alpha channel. Choose PNG or WebP output if you need transparency.
Chroma subsampling controlNot availableThe browser's encoder chooses it and exposes no setting. We will not add a control that cannot affect the output.
Progressive JPEG controlNot availablecanvas.toBlob gives no control over progressive encoding. Use MozJPEG or ImageMagick if you need it.
Colour profile handlingConverted to sRGBA browser canvas works in sRGB, so wide-gamut images are converted. Correct for the web, wrong for print masters.
Bit depth8 bits per channelThe maximum a browser canvas provides. HDR and 10-bit output need AVIF, which browsers cannot write.
Animation supportNot supportedA canvas decodes only the first frame of an animated file, so animation is out of scope rather than half-supported.
Where processing happensIn your browserNo upload endpoint exists in the compression path. Disconnect from the network after the page loads and it still works.
File retentionNone — nothing is receivedThere is no copy to retain or delete, because no file is ever transmitted.
WatermarkNeverThe output contains your image and nothing else.
Account, quota or costNoneNo sign-up, no daily cap, no paid tier withholding a feature.
Browser supportChrome, Edge, Firefox, SafariDesktop and mobile. Requires Canvas and Web Workers, which every current browser provides.

How it works

How to compress image to 20kb

  1. Step 1: Add your image

    Drag it onto the drop zone, click to browse, or paste from the clipboard.

  2. Step 2: Confirm the target

    The limit is already filled in. Change it if your form asks for something different.

  3. Step 3: Download and check the number

    The table shows the exact size produced, so you can confirm it is under the limit before you upload it anywhere.

Features

What this tool does

  • Batch processing

    Queue as many image files as you like. A Web Worker pool handles them in parallel so a large batch does not freeze the page.

  • Real quality control

    The quality slider maps directly to the encoder setting. Move it and the output genuinely changes — there are no cosmetic controls here.

  • Exact target size

    Ask for 200 KB and the encoder searches for the highest quality that fits under your limit, then reports what it actually achieved.

  • EXIF and metadata stripping

    Camera model, lens, timestamps and GPS coordinates can be removed on the way out. Useful before publishing a photo taken on a phone.

  • Format conversion

    Write the result as JPEG, PNG or WebP regardless of what you put in, so you can test which format is smallest for a given image.

  • Nothing is uploaded

    The whole pipeline runs in your browser through the Canvas API. Turn off your network connection after the page loads and it still works.

  • No watermark, no sign-up

    The output is your image and nothing else. There is no account, no daily quota and no paid tier holding back a feature.

  • Works on mobile

    The layout, the drop zone and the results table are all usable on a phone, and mobile browsers run the same encoder as the desktop ones.

In depth

Working at 20 KB

20 KB is a genuinely small budget

Twenty kilobytes is among the tightest limits you will meet, and it is almost always attached to a small image: a signature strip, a thumbnail portrait, an identity photo in a fixed box on a form.

At that size the pixel dimensions matter more than the quality slider. A signature scanned at 800 × 200 pixels reaches 20 KB comfortably and still reads cleanly. The same 20 KB spread across a 4000-pixel-wide photograph gives roughly one byte for every two hundred pixels, which no encoder can make look good.

So if a form asks for 20 KB, check whether it also states dimensions. It usually does, and matching them first makes the size limit easy.

How the tool hits an exact size

Encoders do not take a file size as input — they take a quality setting, and the size falls out of it. Getting to a specific number therefore means searching.

The tool encodes your image at a mid-range quality, measures the result, and then moves the quality up or down depending on whether it came in under or over your limit. It repeats that, narrowing the range each time, until it finds the highest quality that still fits. That is a binary search, and it converges in about eight passes.

If nothing fits even at minimum quality, and you have allowed the dimensions to change, it scales the image down by a fifth and searches again. If you have locked the dimensions, it stops and tells you the target could not be met at that pixel size — rather than quietly handing you a file that will be rejected.

Why upload forms impose these limits

Size caps on government portals, exam boards and job applications are almost always about storage and bandwidth across millions of submissions, not about image quality. A form that accepts a hundred thousand applications at 5 MB each is storing half a terabyte of photographs.

The limits are usually enforced strictly and unhelpfully: the upload is rejected with a generic error, and rarely tells you by how much you missed. That is why it is worth targeting a little under the stated cap — 95 KB for a 100 KB limit — so that any difference in how the server measures the file cannot push you over.

How quality maps to file size

The quality number in a JPEG or WebP encoder is not a percentage of anything. It is an index into a set of quantisation tables that control how aggressively detail is discarded. The relationship to file size is steep and non-linear.

For a typical 12-megapixel phone photograph the curve looks roughly like this:

  • Quality 95–100 — near-original appearance, but the file is often only 20–35% smaller. Rarely worth it for the web.
  • Quality 80–90 — the sweet spot for photography you care about. Typically 50–70% smaller with no artefact you would notice at normal viewing distance.
  • Quality 70–80 — the sweet spot for ordinary web images. Usually 70–85% smaller. Artefacts appear only if you zoom in on flat sky or skin.
  • Quality 50–70 — visible softening and blocking in smooth areas, though thumbnails and background images survive it well.
  • Below 50 — obvious blocking, ringing and colour banding. Useful only for placeholders.

Diminishing returns set in fast at the top of the range. Going from quality 100 to quality 90 usually halves the file for no perceptible change; going from 90 to 80 saves far less and costs slightly more. If you only remember one number, use 80.

Questions

Frequently asked questions

Every answer below is present in the page source, expanded, so it can be read without opening anything.

What is usually asked for at 20KB?

Signature uploads and small identity thumbnails, most often on exam boards and government application portals. These are typically specified alongside exact pixel dimensions — something like 140 × 60 for a signature — and meeting the dimensions first makes the size limit straightforward.

My signature looks grey and broken at 20KB. What went wrong?

A scanned signature is line art on a white background, which is the content JPEG handles worst — you get grey haze and ragged edges. Try PNG output instead: a black-on-white signature at modest dimensions is often under 20 KB losslessly, and it will look sharp rather than smudged.

Will my photo still be usable at 20 KB?

That depends on its pixel dimensions more than anything else. A passport-sized photograph of 600 × 800 pixels looks perfectly clean at 20 KB. A 12-megapixel landscape squeezed to the same size will show visible blocking, because the encoder has to spend those kilobytes across twenty times as many pixels. If the result looks poor, reduce the dimensions first and compress again — that is almost always the fix.

What if the target cannot be reached?

The row is flagged and the tool reports the smallest size it managed. It does not pretend to have succeeded. Turning off "keep original dimensions" gives the encoder permission to scale the image down as well, which will nearly always get there.

Is the file really under the limit?

Yes, and the number in the results table is the byte length of the file you are about to download, not an estimate. Portals occasionally measure in kibibytes rather than kilobytes; aiming for 19 KB removes any doubt.

Are my files uploaded to compress them?

No. The whole search runs in your browser, encoding the image repeatedly in memory on your own device. Nothing is transmitted, which matters when the file is an identity document.

Can I do several images at once?

Yes. Every file in the batch is searched independently to the same target, so a mixed set of photographs all come out under the limit. Download them individually or as one ZIP.

Should I use JPEG or PNG here?

JPEG, unless the image has transparency. PNG is lossless, so its size is dictated by the content rather than by any setting — the target has no effect on it, and the tool says so instead of pretending the slider is doing something.

From the blog

Related reading

Longer explanations from the blog.

  • Image Compression

    JPEG Quality Settings Explained: What the Number Actually Means

    Quality 80 is not 80% of anything. It is an index into a quantisation table. Measured on one photograph: dropping from 100 to 90 removes 77% of the file and 4.2 dB of fidelity; dropping from 40 to 30 removes 17% and costs almost as much.

    8 min read

  • Practical Guides

    How to Reduce Image Size for Email Without Sending a Blurry Mess

    Attachments are base64-encoded in transit, which inflates them by about a third. A 20 MB limit is really a 15 MB limit. Resize to 1600 pixels on the long edge and encode at quality 80, and a photograph lands near 150 KB.

    9 min read

  • Practical Guides

    How to Compress Images for a Website Without Wrecking Them

    Resize before you compress. Measured on one photograph: half the width at quality 80 produced a 16.4 KB file, while full width at quality 40 produced 20.6 KB and looked far worse. The order of operations matters more than the settings.

    8 min read