Skip to content

Resize Image to Exact Dimensions

Resize an image to exact pixels, millimetres, centimetres or inches at any DPI. Correct print metadata is written into the file.

Private · on device. Runs in your browser: your file is not uploaded. No sign-up.

JPG, PNG, WebP, HEIC (iPhone), GIF, BMP or AVIF

Pixels, millimetres and the DPI that connects them

Almost every confusing resize problem comes down to one fact: a digital image has no physical size. It has a pixel count. A physical size only exists once you decide how many of those pixels occupy an inch, the resolution, or DPI.

That is why a form asking for a "3.5 × 4.5 cm photograph" is asking an incomplete question, and why the same requirement produces wildly different pixel counts:

Resolution35 × 45 mm becomesTypical use
96 DPI132 × 170 pxScreen only, too small to print
300 DPI413 × 531 pxThe standard for photo requirements
600 DPI827 × 1063 pxHigh-quality print

If a requirement gives millimetres without a DPI, use 300. It is the near-universal assumption behind published photo specifications.

Why this tool writes DPI into the file

Browsers do not record resolution when they save an image, the JPEG density field is left as "aspect ratio only". So a 413 × 531 px photo produced by most online tools carries no evidence that it is meant to be 35 × 45 mm.

Usually that is harmless. It stops being harmless when the photo will be printed, or when a validator reads the metadata to check the physical size. When you resize in millimetres, centimetres or inches here, the resolution is written into the file so it reports its true physical size.

Choosing what happens when the shape changes

If your image is 4:3 and the target is square, something has to give. The three options handle it very differently:

  • Crop to fill, takes the largest centred region matching the new shape. Nothing is distorted; the edges are lost. This is almost always the right choice for photos of people.
  • Fit and pad, keeps the whole image and fills the remainder with background. Right for logos, documents and diagrams where nothing may be cut off.
  • Stretch, squashes the image into the new shape. Never use this on a face; the distortion is obvious and fails photo review.

If you need to control exactly which part is kept, crop first with the crop tool, then resize.

Enlarging does not add detail

Resizing down discards information and looks fine. Resizing up has to invent information, and inventing it means guessing. A 200 px image scaled to 1000 px is a 200 px image with softer edges.

If a requirement demands more pixels than your source has, the real fix is a new photo, not an upscale. This is the most common reason a photo is refused for being "low quality" despite having the right dimensions.

The order that gives the best result

  1. Crop to the required shape, so you control what is kept.
  2. Resize to the required pixel dimensions.
  3. Compress to the required file size last.

Doing it in this order means compression is only ever working on pixels that matter. Compressing first and resizing after throws away detail twice and looks noticeably worse at the same file size. If your requirement is a standard one, the photo maker does all three in a single step.

Frequently asked questions

How many pixels is 35 × 45 mm?

It depends entirely on the resolution. At 300 DPI it is 413 × 531 px; at 600 DPI it is 827 × 1063 px; at 96 DPI it is only 132 × 170 px. A size in millimetres is meaningless without a DPI, which is why this tool asks for one.

What is DPI and does it matter for an online upload?

DPI describes how many pixels make up an inch when the image is printed. For a screen-only upload it changes nothing. It matters when a photo will be printed, and when a validator reads the metadata to confirm a photo is genuinely 35 × 45 mm rather than a small image claiming to be.

What is the difference between "crop to fill" and "fit and pad"?

When your image is a different shape from the target: crop to fill takes the largest centred region matching the new shape and discards the rest, nothing is distorted, but edges are lost. Fit and pad keeps the whole image and adds background around it. Stretch squashes the image to fit and should be avoided for anything containing a face.

Why does my resized photo look soft?

Enlarging cannot invent detail that was never captured. Going from 200 px to 1000 px wide produces a blurry result no matter what tool you use. Always start from the largest original you have.

Can I resize and hit a file size limit at the same time?

Yes, set a size limit in the output options. The dimensions stay exactly as you specified while compression is tuned to meet the byte limit.

Requirements this tool handles