How It Works

Last updated: November 28, 2026. Written and reviewed by Muhammad Abdullah, founder of Resize Image to 20Kb.

Ever wondered how a 3MB phone photo becomes a 19KB file without turning into a blur? This page opens the hood of Resize Image to 20Kb. We explain the science in simple words, so you can get better results every time.

Step by Step: What Happens When You Resize an Image

  1. You choose an image. Your browser reads the file from your phone or computer. Nothing uploads.
  2. The tool decodes it. It turns the JPG, PNG, WebP or HEIC file into a grid of coloured pixels in memory.
  3. It adjusts the dimensions. If you set a size, such as 140 x 60 pixels or 3.5 x 4.5 cm, it resizes the pixel grid first.
  4. It searches for the best quality. It encodes the image as JPEG at different quality levels and checks the size each time.
  5. It picks the winner. It keeps the highest quality version that stays at or under your target, such as 20KB.
  6. You download the result. The new file goes straight to your device.

All of this uses standard browser features. The MDN Web Docs on the canvas toBlob() method describes the quality setting, a number from 0 to 1 that controls how strongly JPEG compresses an image.

Why 20KB Is So Small

A kilobyte holds 1,000 bytes, and a byte holds 8 bits. So a 20KB file holds about 160,000 bits. Meanwhile, a typical 12 megapixel phone photo contains 12 million pixels, and each pixel normally needs 24 bits for its colour.

That means the raw photo holds roughly 288 million bits. To reach 20KB, the tool must shrink the data by about 1,800 times. That is why dimensions matter so much. A smaller pixel grid gives the encoder far less work to do, so it can keep the image clearer.

KB vs KiB: Why Your File Size Can Look Different

Here is a detail most tools never explain. The international standard says 1 KB equals 1,000 bytes, while 1 KiB equals 1,024 bytes. The NIST guide to binary prefixes sets out this difference.

UnitExact bytesWhere you see it
1 KB (kilobyte)1,000 bytesmacOS, many web portals
1 KiB (kibibyte)1,024 bytesWindows labels this as “KB”
20 KB20,000 bytesStrict portals that count bytes
20 KiB20,480 bytesWindows file properties

Because of this, a file of 20,300 bytes shows as “19.8 KB” in Windows, yet a strict portal reads it as 20.3KB and rejects it. Our tool targets 20,000 bytes by default, so your file passes both checks.

How JPEG Compression Keeps Images Clear

JPEG, the format maintained by the JPEG committee, splits an image into small 8 x 8 pixel blocks. Then it removes fine detail that the human eye barely notices, especially tiny colour changes. Lower quality settings remove more detail and create smaller files.

PNG works differently. It is lossless, so it keeps every pixel exactly. That makes PNG files much larger. For this reason, most photos only reach 20KB as JPG, and most exam portals ask for JPG anyway.

Resize vs Compress: Which One Do You Need?

ActionWhat it changesBest for
ResizeWidth and height in pixels or cmForms with fixed dimensions
CompressFile weight in KBForms with a KB limit
Both togetherDimensions first, then KBClearest result at 20KB

Tips for the Sharpest 20KB Image

  • Crop away empty space before you compress. Every unused pixel still costs bytes.
  • Use a plain, light background for photos. Busy backgrounds eat up file size.
  • Sign with a dark pen on clean white paper. High contrast signatures stay crisp at small sizes.
  • Take photos in daylight. Dark photos contain noise, and noise is hard to compress.
  • Compress once from the original. Repeated compression adds blur each time.

Why Browser Processing Protects You

Most online resizers upload your file to their server. Ours does not. Because the work happens on your device, your photo, signature and ID stay private. It also saves your mobile data, since you never upload a large file. Read our Privacy Policy for the full details.

Now that you know how it works, try it yourself on the Resize Image to 20Kb tool.

Frequently Asked Questions

Can I resize an image to exactly 20KB?

The tool targets the highest quality that stays at or just under 20KB, usually within a few hundred bytes. Most portals accept anything up to the limit, so slightly under is the safest choice.

Why does my image look blurry at 20KB?

Your image probably has large dimensions or lots of detail. Reduce the width and height first, crop away empty space, and then compress. A smaller image stays sharper at 20KB.

Does the tool work without internet?

Once the page loads, the resizing itself happens on your device. You only need internet to open the page.

Is 20KB the same as 20,480 bytes?

Not exactly. In the international standard, 20KB equals 20,000 bytes. Windows shows 20,480 bytes as 20KB because it uses the older 1,024 byte convention. Our tool targets 20,000 bytes to stay safe.