Skip to content
SnapCutout

Start typing to search the guides.

Image Formatting & Compression

How to reduce an image to an exact file size in KB

Government portals and job applications love an arbitrary KB limit. Here is how to hit it exactly.

Published16 September 20265 min read

Digital kitchen scales measuring a small heap of sugar against a blue background

Almost nobody needs a file to be exactly 200 KB for a technical reason. The limits come from upload forms written years ago, and they are enforced without mercy by systems that will not tell you how far over you are.

The frustrating part is that hammering the quality slider is the worst way to get there. There is an order of operations that hits the target with the least visible damage, and it takes about two minutes once you know it.

What you need to know first

Before the step-by-step, these are the points that decide the outcome. If you are in a hurry, the first one covers most cases.

  1. Three levers, in this order

    Pixel dimensions first, quality second, metadata third. Dimensions give the biggest saving for the least visible cost; quality is the fine adjustment; metadata is free bytes you never wanted.

  2. Use a tool that shows the size live

    Squoosh updates the output size as you drag. That turns the whole job from guess-export-check into a single continuous adjustment that lands on the number first time.

  3. Under 60 quality, stop dropping

    Below roughly quality 60 a JPG develops visible blocks in flat areas. If you still cannot hit the limit, reduce the pixel dimensions instead. Smaller and clean beats large and mushy.

  4. Check the form actually accepted it

    Some portals measure the decoded image rather than the file, and some silently reject anything over the limit without saying so. Reload the page after submitting and confirm your image is there.

Why the order matters

Each lever costs you something different. Getting them in the wrong order means paying in visible quality for bytes you could have saved for free.

Lever Typical saving Visible cost When to use it
Reduce pixel dimensions 50–90% None, if still bigger than the display Always, first
Lower JPG quality 30–70% Small down to 75, obvious below 60 Second, as the fine adjustment
Strip metadata 20–100 KB None Always, on export
Convert to WebP 25–35% None Only if the form accepts it
Convert to greyscale 10–20% Enormous Almost never

The last row is there as a warning. Converting a colour photo to greyscale to save bytes is a false economy. It destroys the image far more than a quality drop would, for a saving you could have got by resizing.

The method

Step 1: Find out what the limit really is

Read the form’s requirements twice. “Maximum 200 KB” is a file size. “Maximum 600 × 800” is pixel dimensions. “Maximum 2 MP” is the two multiplied together. These are completely different constraints and people routinely fix the wrong one. If the form specifies both, the dimensions are the harder limit, so start there.

Step 2: Resize to just above what you need

Scale the long edge down to a sensible display size. For most forms, 1000–1200 px is generous. For ID photos and small portal thumbnails, 600 px is usually plenty. Lock the aspect ratio. Do not crop unless the form asks for a specific shape.

Step 3: Open Squoosh and watch the number

Drag the file into squoosh.app, choose MozJPEG or WebP on the right, and begin at quality 80. The output size appears under the preview and updates as you drag. Move the slider down until the number sits comfortably under the limit. Aim for about 10% under, because some systems count slightly differently than your file manager does.

Step 4: Strip the metadata

Tick the option to remove EXIF data if your tool offers one. A GitHub issue on Squoosh reports that it drops EXIF data when it re-encodes a JPG, but that report is old, so check the output file. On a small file this is not a rounding error: camera metadata can add tens of kilobytes, and it can include GPS coordinates, which you almost certainly do not want attached to a document you upload.

Step 5: Verify at full size before uploading

Open the exported file and look at it properly. A passport photo that is legible on your phone thumbnail and blocky at full size will be rejected by a human reviewer, and you will have waited three weeks to find out.

Do not compress your only copy. Portal uploads are exactly the situation where people export over the original, get rejected, and discover there is nothing left to try again with. Export to a new file with a name like photo-200kb.jpg and leave the source untouched.

Hitting specific common limits

Target Suggested dimensions Format Quality Notes
Under 20 KB 400 px long edge JPG 70 Crop tight; detail will not survive
Under 50 KB 600 px long edge JPG 72 Typical ID photo territory
Under 100 KB 900 px long edge JPG 75 Comfortable for most documents
Under 200 KB 1200 px long edge JPG 80 Looks good on any screen
Under 500 KB 1600 px long edge JPG 82 Effectively no compromise
Under 1 MB 2000 px long edge JPG 85 More than most forms ever need

These are starting points, not laws. A photo of a plain document compresses far harder than a busy landscape, so check the live size rather than trusting the table.

When the file still will not shrink

If it is a PNG, that is your problem. A photographic PNG can be five times the size of the equivalent JPG. Convert to JPG and the limit usually stops being an issue immediately. The exception is a screenshot of text, which should stay PNG: shrink its dimensions instead.

If it is a screenshot, crop it. Most screenshots are mostly empty interface. Cropping to the part that matters cuts both the dimensions and the complexity, and makes the result easier to read at the same time.

If it is a scan, scan again at a lower DPI. A document scanned at 600 DPI is four times the data of the same page at 300 DPI, and no portal on earth needs 600. For plain text, 200 DPI is legible.

In short

Dimensions, then quality, then metadata, in that order, watching a live size readout, and always into a new file. Ninety per cent of “my image is too big for this form” problems end within two minutes of doing it that way.

For the general version of this skill without a hard target, see compressing images without losing quality. If the form is also fussy about dimensions, resizing without distortion explains how to hit a specific shape, and WebP vs PNG vs JPG covers which format to hand over.

Frequently asked questions

Why does the form say my file is too big when it is under the limit?

Usually one of three things: the limit applies to pixel dimensions rather than kilobytes, the form rejects your format (many older portals accept only JPG), or the file name contains characters the system cannot handle. Try renaming to plain letters and numbers and re-exporting as a standard JPG before assuming the size is the problem.

How do I get a photo under 50 KB and still readable?

Reduce the pixel dimensions hard, around 600 px on the long edge, and then export at quality 70. A small, clean image at 45 KB looks far better than a large, blocky one at the same weight. If the image contains text, crop tighter so the text occupies more of the frame before shrinking.

Can I make a file bigger to meet a minimum size?

Some forms specify a minimum as a crude quality check. Increase the pixel dimensions modestly or export at quality 95 rather than padding the file artificially. Padding with junk data can make the file unreadable to the system checking it.

Does renaming the extension from .png to .jpg work?

No, and it usually makes things worse. The extension is a label; the contents are still a PNG, and the file size does not change at all. Most upload systems inspect the actual contents and reject the mismatch. Convert properly by re-exporting.