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.
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 pixel | Typical quality |
|---|---|
| 0.25 – 0.5 | Moderate to good, suitable for some uses |
| 0.5 – 0.75 | Good to very good |
| 0.75 – 1.5 | Excellent, sufficient for most uses |
| 1.5 – 2.0 | Usually 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.
| Limit | Bit budget | Longest side for good quality | Typical use |
|---|---|---|---|
| 20KB | 163,840 bits | ≈ 540 px | Signatures, strict exam forms |
| 50KB | 409,600 bits | ≈ 850 px | Application photos, profile pictures |
| 100KB | 819,200 bits | ≈ 1,200 px | Forms, thumbnails, product listings |
| 200KB | 1,638,400 bits | ≈ 1,700 px | Web 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
- Open one of the presets above, or choose Target File Size and type your limit in KB.
- Add your JPG, PNG or WebP files (up to 20 at once).
- If the photo comes from a phone or camera, set Max width/height from the table, or tick Allow smaller dimensions.
- Press Compress JPG, then inspect the result with the comparison slider and 100% zoom.
- 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.
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.
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.
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.
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.