Resize a photo to exact pixels and an exact file size

Hit an exact pixel size and an exact KB target in one step, the way visa and exam portals demand. Measured in your browser, and never uploaded anywhere.

๐Ÿ”’ Runs in your browser

The problem is that there are two rules, not one

Almost every government photo upload enforces an exact pixel size and a byte limit at the same time. Singapore wants 400 x 514. Kenya's eTA refuses anything over about 293 KB. Australia demands at least 70 KB. Pakistan allows 5 MB for the photo but only 1 MB for your documents.

Free tools do one or the other. Resizers hit the dimensions and leave you a 4 MB file. "Compress to 100 KB" tools hit the bytes and hand back the wrong dimensions. You end up bouncing between two websites, uploading a photograph of your own face to both, and still getting rejected.

Doing both at once is the entire point of this tool, because the portal checks both and refuses on either.

Measured, not estimated

JPEG quality has no reliable relationship to file size. It depends on what is actually in the image โ€” a busy background and a plain one, at identical quality settings, can differ by several times.

So nothing here is predicted. The image is encoded repeatedly at your exact pixel size, and each result is weighed, narrowing in until it lands inside your target. The number you see is the number that downloads.

That matters most in the situation you are probably in: an application open in another tab, a deadline, and no appetite for discovering the file was 4 KB over.

It will not stretch your face

If your photo is 4:3 and the portal wants 400 x 514, something has to give.

Stretching would satisfy the pixel check and fail the one that matters. A distorted face is a rejected passport photo, and the rejection will not explain itself.

So the image is centre-cropped to the correct proportions first, then scaled. You are told when that has happened, because cropping moves the framing and you should look at the result before submitting โ€” head position and headroom are exactly what photo-validation software measures.

Minimums exist, and most advice ignores them

Search for help with a visa photo and you will be told to compress it as hard as possible.

On Australia's ImmiAccount that advice fails outright. Home Affairs sets a 70 KB minimum, and a photo squeezed down to 40 KB is rejected for being too small. The same trap appears on exam portals that specify a range rather than a ceiling.

This tool treats a minimum as a real target: it raises quality to reach one, and when the source image genuinely does not carry enough detail, it says so instead of quietly handing back something that will fail.

About HEIC

An iPhone saves photographs as HEIC by default, and most browsers cannot open that format at all. Safari can, so on a Mac or an iPhone this will usually just work.

Everywhere else, fix it at the source: Settings, then Camera, then Formats, then Most Compatible. The camera will save JPEG from then on. For photos you have already taken, sharing or exporting them usually converts them on the way out.

What this does not do

  • It cannot tell you whether the photo meets the composition rules. Head height, expression, background colour, glasses, headwear โ€” those are judged by the portal, and no resizer can check them.
  • It cannot rescue a low-resolution original. Enlarging a small photo to meet a pixel requirement produces a soft image that a validator may reject. Start from the largest version you have.
  • It will not invent detail to reach a minimum. If the image is too simple to reach the floor, you need a better source, and the tool will tell you so.

This tool runs entirely inside your browser. Your file is never uploaded โ€” it never leaves your device, so there is nothing for us or anyone else to read, store or leak.

Common questions

Why do portals demand exact pixels AND an exact file size?

Because two different systems check two different things. The pixel size is what the photo-validation software measures - face position, head height, proportions. The byte limit is what the upload system enforces. They are separate checks, they are enforced separately, and a file that satisfies only one gets rejected.

Will my photo be stretched to fit?

No, and this matters more than it sounds. Forcing a 4:3 photo into a 400x514 box by stretching would satisfy the pixel check and fail the human one, because a distorted face is a rejected passport photo. This centre-crops to the right proportions first, then scales - and it tells you when it has cropped, so you can check the framing.

My portal has a MINIMUM size. Why does every guide say to compress hard?

Because most guides have never met one. Australia ImmiAccount sets a 70 KB floor, and a photo compressed to 40 KB fails it. Advice to "compress as much as you can" is actively wrong on those portals. This tool treats a minimum as a real target and raises quality to reach it, or tells you plainly when the source image does not carry enough detail.

Is the size shown the size I actually get?

Yes. JPEG quality has no fixed relationship to file size - it depends entirely on what is in the picture, so a busy photo and a plain one at the same quality can differ several times over. Rather than guessing, this encodes the image repeatedly and narrows in on your target by measuring the real output. What you see is what downloads.

Can it open HEIC files from my iPhone?

Only in Safari, which can decode HEIC natively - so on a Mac or iPhone it will usually work. Other browsers cannot open HEIC at all. The reliable fix is on the phone: Settings, then Camera, then Formats, then Most Compatible, which makes the camera save JPEG instead. Existing photos can be re-exported by sharing them, which converts them on the way out.

Written and maintained by Mustak Momin ยท Last reviewed