Free tool · JPEG output · Runs in your browser

Compress an image to 20 KB

No uploadRuns in your browserReviewed October 9, 2026

Short answer

Choose your image and the tool finds the best JPEG that fits 20 KB (20,480 bytes). On our test images it kept 0 of 4 at full size and shrank 4: the 3.1 MB photo became 306 × 309 at 76% quality (19 KB), and the 733 KB portrait 295 × 368 (19 KB). Quality alone missed the target on 4 of 4. Nothing is uploaded.

Exact selected target: 20,480 bytes. These existing KB controls use 1,024 bytes per unit; a decimal search preset retains its exact byte count.

Choose an image after setting the target.

Output is JPEG, because quality-versus-size can be searched reliably for it. The result may be below or above the target; the actual size and any unreachable target are reported. An exact byte count cannot be promised. Quality is searched first; the picture is shrunk only when quality alone cannot reach the target, and the result list shows the new size. Untick the option to keep the dimensions and trade quality only.

Key takeaways

  • A 20 KB target means 20,480 bytes (1 KB is 1,024 bytes in this tool). The results landed between 96% and 98% of it, never over.
  • Photo, 3840 × 3877: quality alone could not get below 185 KB; with shrinking, 306 × 309 at 76% and SSIM 0.94.
  • Portrait, 2122 × 2644: quality alone left 51 KB; with shrinking, 295 × 368 at 76%, SSIM 0.92.
  • Document scan: 504 × 209 at 75%. Graphic: 269 × 272 at 80%.
  • A file already near the target barely changes: our 66.6 KB JPEG became 20 KB at 284 × 333.

What 20 KB means for a picture

20 KB is 20,480 bytes. The way to read it is in bits per pixel: the same budget spread over more pixels means each pixel gets fewer bits and the picture gets blockier. The table shows what the search chose for each image.

How much picture 20 KB buys: bits per pixel of each result with the shrink option.
ImageResultPixelsBits per pixel
Photo19 KB306 × 3091.69
Portrait19 KB295 × 3681.45
Document scan20 KB504 × 2091.53
Graphic (PNG)20 KB269 × 2722.19

For 4 of the 4 images the search had to shrink the picture to keep the quality at a sensible level; the smallest result was 269 × 272 pixels.

Measured: 20 KB with and without shrinking

Measured in headless Chromium with the browser's own canvas JPEG encoder, the way the tools draw: a white background, then toBlob at the quality given. Five public domain images: a 3840 × 3877 photo (3.1 MB), a 2122 × 2644 portrait (733 KB), a 3827 × 1588 handwritten document scan (1.36 MB), a 5380 × 5432 PNG graphic with transparency (18.9 MB) and a small 441 × 517 JPEG (66.6 KB). SSIM compares each result with the original at the result's own size, so 1.0 would be identical. Other browsers use their own encoders, so sizes can differ.

Each image compressed to 20 KB (20,480 bytes) with and without the shrink option.
ImageOriginalQuality onlyQuality and size
Photo, 3840 × 38772.96 MB185 KB (over), 5%, SSIM 0.68306 × 309, 76%, 19 KB, SSIM 0.94
Portrait, 2122 × 2644715.7 KB51 KB (over), 5%, SSIM 0.74295 × 368, 76%, 19 KB, SSIM 0.92
Document scan, 3827 × 15881.30 MB101 KB (over), 5%, SSIM 0.84504 × 209, 75%, 20 KB, SSIM 0.91
Graphic (PNG), 5380 × 543217.99 MB307 KB (over), 5%, SSIM 0.55269 × 272, 80%, 20 KB, SSIM 0.87

With quality alone, photo, portrait, document scan, graphic (png) missed the target even at the lowest quality, which is why the tool shrinks the picture by default.

What is kept and what is saved at 20 KB

The share of pixels kept and the share of bytes saved, with the shrink option on. A picture that keeps a quarter of its pixels has half the width and half the height.

Savings at 20 KB.
ImageOriginalResultSmaller byPixels kept
Photo2.96 MB19 KB99.4%0.6%
Portrait715.7 KB19 KB97.3%1.9%
Document scan1.30 MB20 KB98.5%1.7%
Graphic (PNG)17.99 MB20 KB99.9%0.3%

Shrinking changed the score by +0.26, +0.19, +0.07, +0.32 (photo, portrait, document, graphic). The largest gains came where quality alone had to drop very low to fit.

Before you upload it

  • Check the destination's own limits. If it asks for pixel dimensions as well as 20 KB, resize first and then compress.
  • Look at the result at the size it will be shown. SSIM says the picture is a faithful smaller copy, not that a face is recognizable or text is readable.
  • Keep your original. Compress a copy.
  • If 20 KB is a limit and the file is just under it, leave a little room: some systems count a file's size differently.

Free tools:The target size tool, any sizeCompress an image with a sliderCompress an image to 50 KBCompress an image to 100 KBCompress an image to 200 KBCompress an image to 500 KB

Questions people ask

How do I compress an image to 20 KB?

Choose 20 KB (or type 20 KB) in the target size tool and add your image. It searches quality and shrinks the picture only if it has to.

Will my picture be smaller in pixels?

Often, at 20 KB. In our test 4 of 4 images were shrunk; the smallest was 269 × 272.

Is the result exactly 20 KB?

No. It stays at or under 20,480 bytes and, in our tests, within 4% below it at most.

What happens to a PNG?

It becomes a JPEG on a white background; transparency is lost.

Can I keep the original dimensions?

Yes. Untick the shrink option. The tool then trades quality only, and says if the target cannot be reached.

Why does a document or text image look worse at small sizes?

JPEG softens sharp edges, and a small picture has fewer pixels for each letter. Check readability before you send it.

Is my image uploaded?

No. It stays in your browser.

Related

Sources and how we checked

  1. MDN: HTMLCanvasElement.toBlob() (read 2026-10-09)
  2. MDN: CanvasRenderingContext2D.imageSmoothingQuality (read 2026-10-09)
  3. Wikimedia Commons: NASA, Portrait of Neil Armstrong (public domain); the other test images are NASA public domain files and the Bliss copy of the Gettysburg Address (read 2026-10-09)

Reviewed October 9, 2026. The measurements ran the tool's own code in headless Chromium with the browser's canvas JPEG encoder. The script and the results are in data/seo/hub/evidence/2026-10-09/image.