Tutorial · 6 min read · Updated 13 August 2026
How to resize an image without stretching it
A form wants 200×200 and your photo is 3000×4000. Those are different shapes, so something has to give. The only question is what.
A form wants your photograph at exactly 200×200 pixels. Your photo is 3000×4000. One of those is a square and the other is a tall rectangle, and no amount of resizing turns one shape into the other. Something has to be given up. You only get to decide what.
Get that decision wrong and you end up with the distorted photo everyone recognises: a face subtly too wide, or a logo that looks like it was pressed. Here is how to reach an exact size without it.
Aspect ratio is the thing that constrains you
Aspect ratio is width divided by height. A 3000×4000 photo is 3:4. A 200×200 target is 1:1. Those are different proportions, and every problem in this article comes from trying to move between them.
If your image and your target share a ratio (1000×1000 down to 200×200, or 1920×1080 down to 640×360), there is no problem at all. Resize and you are finished. Everything below is about what to do when they disagree.
Three ways to handle a mismatch
Web browsers face the same choice when they fit an image into a box. CSS names the three options
in its object-fit
property: cover crops, contain pads and fill stretches.
Crop: usually the right answer
Cut away the parts of the image that fall outside the target shape. Nothing left is distorted; everything kept is exactly as it was.
For a portrait going into a square, this means trimming the top and bottom, which is usually the sky, the ceiling or your shoulders. A passport-style photo wants the head filling the frame anyway, so a crop removes precisely what the form did not want.
The cost: you lose whatever was outside the frame. If the subject is off to one side, a centre crop can cut it in half. Check the result instead of assuming.
Pad: when nothing can be lost
Fit the whole image inside the target and fill the leftover space with a solid colour, usually white. Nothing is cut and nothing is distorted.
This is right for product photographs on a marketplace that demands square images, for logos, and for diagrams where the edges carry meaning.
The cost: the subject ends up smaller within the frame. Some identity documents specify a minimum head height, and padding can push you under it.
Stretch: never
Forcing 3:4 into 1:1 without cropping means squashing the height or pulling the width. Faces look wider, circles become ovals, and text looks slightly wrong in a way people notice even if they cannot say why.
There is almost no situation where this is the right choice. If a tool offers to “stretch to fit”, it is offering to ruin your image.
Making things larger is a different problem
Everything above assumes you are going down in size. That is safe, because you are only discarding information you already had.
Going up is different. A 200×200 image enlarged to 800×800 needs sixteen times as many pixels as it has, and those pixels do not exist. The software invents them by averaging neighbours, and invented detail always looks soft. Enlarging cannot recover detail that was never captured.
So if a form wants 600×600 and your image is 300×300, do not enlarge it. Go back to the original photograph and resize from that. The full-resolution file from the camera is almost always still somewhere.
Doing it here
Both steps run in your browser, and the image is never uploaded. For an identity photograph, that is a good reason to use them.
- For common sizes there is a page each: 200×200, 300×300, 512×512. They open with the dimensions already set.
- For any other size, the image resizer takes a width and a height directly.
- To choose which part survives, crop it first, then resize the result.
If the form also demands a file size (most do), resize first and compress second. Compressing a huge image down to 20KB wastes all of that effort on pixels you were about to discard; the order counts for more than people expect.
A useful shortcut
Many forms give dimensions in centimetres instead of pixels. 3.5×4.5cm is the standard passport photo size across much of the world. To convert, multiply by the required DPI, which is usually 300 for anything that will be printed:
3.5cm ÷ 2.54 × 300 ≈ 413 pixels wide, and 4.5cm ÷ 2.54 × 300 ≈ 531 pixels tall.
If the form says centimetres but never mentions DPI, it is almost certainly going to be printed, and 300 is the safe assumption.