Files never leave your device

Compress Image to 20KB

A 20KB limit is one of the strictest you'll meet online — it's common on government job portals, exam applications, and passport systems across South Asia, including Pakistan's DGIP passport portal. At this size there is no room for waste: the compressor has to find the exact quality level that lands under 20,480 bytes without turning your photo into a blur.

PixKB does this with a binary search across JPEG quality levels, testing up to nine compression passes in your browser and keeping the best result that fits. If quality alone can't reach 20KB, it steps the dimensions down gradually instead of destroying the image in one crude jump. You watch the whole process live on the size gauge.

or drop it anywhere in this box

JPG, PNG, WebP · processed locally on your device

Custom target, 2–10240 KB

Match the portal's rule

Everything runs in your browser using the HTML5 Canvas — your photo is never uploaded to any server.

Getting a good photo under 20KB

Three things decide how good a 20KB photo can look. First, dimensions: a 350×467 px portrait fits comfortably in 20KB at decent quality, while a 4000 px camera photo cannot — let the tool downscale it. Second, background: plain, evenly lit backgrounds compress far better than busy ones, which is one hidden reason portals demand white backgrounds. Third, format: JPEG is the only realistic choice at this size; PNG cannot compete on photographs.

Frequently asked questions

Why does my portal reject photos even under 20KB?

Most portals check dimensions and format too. If the form states a pixel size (for example 350×467), resize to exactly that first — use our Dimensions tab or a portal preset — then compress.

Will 20KB make my photo look bad?

At typical form dimensions (under ~500px), no — the binary search finds the highest quality that still fits. Heavy quality loss only appears if you force very large dimensions into 20KB.

Is my photo uploaded to your server?

No. Compression runs in your browser using the HTML5 Canvas. The file never leaves your device — you can even load this page, go offline, and it still works.

Related tools