Resize an image in cm, mm or inches
Forms and printers often describe a photo by its physical size: 3.5 x 4.5 cm, 35 x 45 mm, 2 x 2 inches, or 51 x 51 mm. A digital image has no size in cm by itself; it has pixels, plus a DPI (dots per inch) value that says how densely to print them. This image resizer does the arithmetic for you. Type the width and height in the unit you were given, choose the DPI, and the photo is saved with exactly the right number of pixels for that size.
The formula
Pixels = size in cm ÷ 2.54 × DPI. In mm, divide by 25.4 instead; in inches, multiply the inches by the DPI. Some common sizes:
- 3.5 x 4.5 cm (35 x 45 mm): 413 x 531 pixels at 300 DPI, 276 x 354 at 200 DPI.
- 2 x 2 inches (51 x 51 mm): 600 x 600 pixels at 300 DPI.
- 5 x 5 cm: 591 x 591 pixels at 300 DPI.
The pixel size appears under the inputs as you type, so you can match a form that gives both a size in cm and a size in pixels.
Exactly this size, or fit inside
Exactly this size (the default here) fills the whole width and height. When the photo is a different shape, for example a landscape phone photo going into a portrait passport frame, the edges are trimmed evenly from both sides, so the centre of the picture stays. Position the face roughly in the middle, or crop it yourself first for full control. Fit inside keeps the whole photo and makes it as large as fits within the size, so one side may come out shorter.
DPI is written into the JPG
When you size in cm, mm or inches, the saved JPG records the DPI you chose. Photo software, word processors and printers then treat it as that physical size, so a 3.5 x 4.5 cm photo prints at 3.5 x 4.5 cm without adjusting anything. PNG and WebP files are saved with the right pixels but without the DPI note, so JPG is the better choice for printing.
A size in cm and a limit in KB
Online forms often combine a print size with a file size, such as a 3.5 x 4.5 cm photo under 50 KB. Switch Any size to At most and type the KB. The size in cm is kept exactly and only the JPG quality is adjusted to fit; at passport size even 20 KB is usually reachable. For file size limits without a print size, use reduce image size in KB or compress image to 50 KB, and for a minimum use increase image size in KB.
Private by design
Resizing runs in your browser and the photo never leaves your device. The saved copy also leaves out the camera details and location data that phones store in photos. See all image tools.
The image is redrawn with your browser's own canvas, so the result depends on the browser's JPG, PNG and WebP encoders. MDN's image file type guide explains which format suits photos, signatures and scans.