First, what "100 KB" means
A limit written as 100 KB is ambiguous, and the ambiguity is not academic: the two readings differ by 2.4%. File systems, some upload forms and the "size" column in a file manager count in 1,024-byte kilobytes (properly KiB). Network and storage specs count in 1,000-byte kilobytes. So 100 KB is either 102,400 bytes or 100,000 bytes, and a file of exactly 100,000 bytes is 97.7 KiB — under one reading and over the other.
The practical rule: aim for a few percent below the limit, not exactly at it. If the form says 100 KB, stop at about 95,000 bytes and you satisfy both readings. The same trap runs through megabytes — 1 MB is 1,048,576 bytes in binary, 1,000,000 in decimal, a 4.9% gap. If you need the raw conversions, the unit converter does them with the exact factors.
What a budget buys in pixels
Bytes are the unit you are given; pixels are the thing you are choosing, because dimensions decide how much detail survives. The conversion between them is not fixed — it depends on what is in the picture and on the JPEG quality setting — but a mid-quality JPEG of a photograph typically lands between 1 and 2 bits per pixel. That is a stated assumption, not a law; it is good enough to plan with, and you can verify it in one minute with any compressor.
Applying it to the common limits:
| Target | Bytes (binary) | Roughly what it holds, at 1–2 bits per pixel |
|---|---|---|
| 20 KB | 20,480 | about 81,000–160,000 px — roughly 285×285 to 400×400 |
| 50 KB | 51,200 | about 200,000–410,000 px — roughly 450×450 to 640×640 |
| 100 KB | 102,400 | about 400,000–810,000 px — roughly 640×640 to 900×900 |
| 200 KB | 204,800 | about 810,000–1,640,000 px — roughly 900×900 to 1,280×1,280 |
| 500 KB | 512,000 | about 2,100,000–4,210,000 px — roughly 1,450×1,450 to 2,050×2,050 |
| 1 MB | 1,048,576 | about 4,000,000–8,500,000 px — roughly 2,000×2,000 to 2,900×2,900 |
Read the table as a ceiling, not a promise. A photo of a textured surface — foliage, fabric, a crowd — needs more bits than a photo of a wall, so it lands at the low end of the pixel range. A screenshot of text lands at the high end, though it usually should be PNG rather than JPEG.
What fails first at a small limit
The order is predictable, and knowing it saves a round trip:
- Dimensions beat quality. Cutting width and height by half leaves 25% of the pixels — a factor of four — before any quality change. Dropping JPEG quality from 90 to 70 usually buys less than that. If you are far from the target, shrink first; if you are close, lower quality.
- Faces go soft before they look broken. A portrait at 40% quality looks acceptable in a thumbnail and visibly wrong at full size. If the file is a passport or ID photo, the pixels matter more than the bytes: a 20 KB budget at 600×600 is a losing fight, and some forms will reject the result for resolution.
- Screenshots should not be JPEG at all. Text has hard edges and JPEG turns them into halos. A screenshot that is a 400 KB PNG often drops to under 100 KB as a PNG with fewer colours or smaller dimensions, and stays legible.
- Transparency does not survive JPEG. A logo with a transparent background flattened to JPEG gets a white box around it. If the target format allows PNG, stay PNG.
Read the form's sentence, not just the number
Three details decide whether a file passes, and they are usually in the sentence around the number rather than in the number itself:
- Per file or in total? "Upload up to 1 MB" on a form that accepts four files often means four times the budget — or exactly the opposite. Check the error message the first time you submit.
- Maximum or minimum? Visa and passport portals sometimes have a floor as well as a ceiling, and 50 KB minimum with 10 MB maximum is a combination that exists in practice. Compressing to 30 KB then fails for being too small, which reads like a bug and is not one.
- Does the site re-encode? Social platforms and many uploads re-compress server-side. If they do, the bytes you save at the last 5% are thrown away anyway, and the thing to optimise is dimensions. If they store the file as-is, the byte budget is real.
What this approach cannot do
Being explicit about the boundary is faster than letting someone discover it after uploading:
- PDF is not an image. A PDF's size comes from embedded images, fonts and sometimes full-page scans; removing a page or flattening a form is a different job from re-encoding a JPEG. This site's PDF tools merge and split, and neither of them shrinks a scan.
- Video is not an image either. A few seconds of 1080p is tens of megabytes, and no quality slider turns that into 100 KB without becoming unwatchable.
- Office files and archives hold already-compressed material — re-zipping a .docx does nothing useful.
- A 2,000-pixel passport photo cannot fit in 20 KB. If the requirement is both a high resolution and a tiny file, one of the two numbers is wrong; ask before you spend an hour on it.
Where the actual work happens
Once the target is a number, the compression is one step:
- Compress an image to a target size — set a byte budget and the tool lowers quality until the file fits, showing the result size before you download.
- Resize an image to specific dimensions — when the limit is really about pixels (a form asking for 600×600, an avatar, a thumbnail).
Both run in the browser. The photo never leaves the machine, which matters for the kind of image that arrives with a size limit attached: passport photos, ID scans, application forms.
Check the result before you submit
Two numbers decide whether the upload passes: the byte count and the pixel dimensions. Both are visible in the file's properties, and both are shown by the tools above after processing. Keep the original until the form accepts the file — a re-encode is not reversible, and a second compression of an already-compressed JPEG makes it worse for the same size budget.