← Open the compressor

Compress a JPG to 20KB, 50KB, 100KB or 200KB

Exam portals, job applications, passport offices and marketplaces all love a hard number: "photo must be under 50KB", "signature maximum 20KB". Most advice stops at "use a compressor". This guide explains why some photos refuse to shrink, gives you the one number that predicts the outcome before you press a button, and shows the right settings for each common limit.

Jump straight to a preset

Each button opens CompJPG in Target File Size mode. Your image never leaves your device.

20KB 50KB 100KB 200KB

The one number that matters: bits per pixel

A file-size limit is really a budget. 20KB is 20,480 bytes, or 163,840 bits. The encoder has to describe every pixel of your photo inside that budget. Divide the budget by the number of pixels and you get bits per pixel (bpp), the single best predictor of how a JPEG will look.

When the JPEG standard was published, its designers summarised typical results for colour photographs roughly like this (G. K. Wallace, The JPEG Still Picture Compression Standard, 1991):

Bits per pixelTypical quality
0.25 – 0.5Moderate to good, suitable for some uses
0.5 – 0.75Good to very good
0.75 – 1.5Excellent, sufficient for most uses
1.5 – 2.0Usually indistinguishable from the original

Now look at a modern phone photo: 4000 × 3000 = 12 million pixels. Squeeze that into 20KB and each pixel gets about 0.014 bits, roughly eighteen times less than even the lowest row of that table. No quality setting can rescue that. The only real fix is fewer pixels.

The right dimensions for each limit

Working backwards from a comfortable 0.75 bpp gives a practical maximum size for a 4:3 photo. Enter the "longest side" figure in CompJPG's Max width/height box, or tick Allow smaller dimensions and let the tool find it for you.

LimitBit budgetLongest side for good qualityTypical use
20KB163,840 bits≈ 540 pxSignatures, strict exam forms
50KB409,600 bits≈ 850 pxApplication photos, profile pictures
100KB819,200 bits≈ 1,200 pxForms, thumbnails, product listings
200KB1,638,400 bits≈ 1,700 pxWeb images, detailed portraits

These are starting points, not laws. A plain-background portrait compresses far better than a photo of foliage, crowds or a sunlit harbour full of ripples. Busy images need either fewer pixels or a bigger budget. If a portal states exact pixel dimensions, those always win.

How to do it in CompJPG

  1. Open one of the presets above, or choose Target File Size and type your limit in KB.
  2. Add your JPG, PNG or WebP files (up to 20 at once).
  3. If the photo comes from a phone or camera, set Max width/height from the table, or tick Allow smaller dimensions.
  4. Press Compress JPG, then inspect the result with the comparison slider and 100% zoom.
  5. Download, and check that the destination accepts the file.

The result is often a little under the limit. JPEG quality moves in steps, so there is not always an output at exactly 50.00KB. CompJPG searches for the highest quality that stays inside your budget, and warns you instead of pretending when the image cannot fit at its current dimensions.

20KB: signatures and very strict forms

At 20KB, dimensions matter more than the quality slider. For a handwritten signature, crop tightly and keep the width around 300–600 pixels. A white, evenly lit background helps enormously: shadows and paper texture are "detail" that the encoder must spend bits on. For a face photo, follow the portal's stated pixel size exactly.

Open the 20KB preset →

50KB: application and profile photos

Fifty kilobytes leaves real breathing room. A well-cropped portrait at 600–850 pixels can look clean. Crop away walls, desks and empty borders before compressing; every pixel you remove gives the face more of the budget. Avoid screenshots of photos and use the original camera file.

Open the 50KB preset →

100KB: forms, thumbnails and listings

100KB is the everyday middle ground: small enough for most upload forms and fast web pages, large enough that edges and gradients stay clean at around 1,000–1,200 pixels. It suits product thumbnails, article images and email. If the destination allows more, use it: there is no prize for being smaller than you need.

Open the 100KB preset →

200KB: detail-friendly web and portfolio images

At 200KB the encoder can keep skin texture, hair and gentle colour transitions. It works well for blog images and portfolio previews up to about 1,700 pixels. A full-screen landscape packed with detail may still want more; in that case resize to the size it will actually be displayed at.

Open the 200KB preset →

Five habits that protect quality

  • Always start from the original. Every JPEG save throws a little information away; recompressing a download compounds the damage.
  • Crop before you compress. Removing irrelevant pixels is free quality.
  • Reduce noise at the source. Good light means less sensor noise, and noise is expensive to encode.
  • Inspect at 100%. Check eyes, lettering, thin pen strokes and straight edges, where artifacts appear first.
  • Use the full allowance. If the form accepts 100KB, do not aim for 20KB.
Curious why JPEG behaves this way? The Beautiful Mathematics Behind Every JPEG walks through the cosine transform that decides where those bits go.

Your photo stays private

Signatures, identity photos and application documents are personal. CompJPG compresses them inside your browser; the image is never sent to our server. For official photos, also read the passport and ID photo guide, because file size is only one of the rules a portal checks.