How to change image size in cm, inches or pixels

An image only has pixels; cm and inches come from the DPI you print at. Pixels = cm ÷ 2.54 × DPI, so 3.5 cm at 300 DPI is 413 px. Here is how to resize to any size.

Published by ThatToolSite

In resize image, choose pixels, cm or percent, type the size and download. Your photo stays on your device.

Resize an image

Pixels, cm and DPI: what actually changes

A digital image has a size in pixels only, such as 1200 × 1800. A size in cm or inches only exists once you decide how many pixels to fit into each inch, the DPI (dots per inch, also written PPI, pixels per inch).

The same 1200 × 1800 px photo prints at 4 × 6 inches at 300 DPI, or 8 × 12 inches at 150 DPI. So “change the image size to 3.5 × 4.5 cm” really means one of two things:

  • Make the file the right number of pixels for 3.5 × 4.5 cm at a chosen DPI. This is what printing and most forms need.
  • Keep the pixels and change the DPI label so the image prints at that size. This doesn’t change the file’s pixels or its KB.

cm to pixels formula

There are 2.54 cm in an inch, so:

pixels = cm ÷ 2.54 × DPI

cm = pixels ÷ DPI × 2.54

3.5 cm at 300 DPI: 3.5 ÷ 2.54 × 300 = 413 px

For inches and millimetres:

pixels = inches × DPI, or mm ÷ 25.4 × DPI

Which DPI to use: photo prints are usually made at 300 DPI. On screens, CSS (the language of web page layout) defines an inch as exactly 96 pixels, so 1 cm on a web page is about 37.8 px. If a form gives a size in cm but no DPI, assume 300 for anything that will be printed.

Common sizes in pixels

SizeAt 96 DPI (screen)At 200 DPIAt 300 DPI (print)
1 × 1 cm38 × 3879 × 79118 × 118
3.5 × 4.5 cm (passport)132 × 170276 × 354413 × 531
5 × 5 cm189 × 189394 × 394591 × 591
2 × 2 in192 × 192400 × 400600 × 600
10 × 15 cm (4 × 6 in print)378 × 567787 × 11811181 × 1772
A4, 21 × 29.7 cm794 × 11231654 × 23392480 × 3508

Pixels are rounded to whole numbers. A 4 × 6 inch print is exactly 1200 × 1800 at 300 DPI; 10 × 15 cm is slightly smaller, because 15 cm is a little under 6 inches.

The passport photo size guide lists the pixel sizes for each country’s passport photo.

Pixels needed for photo prints

Standard print sizes and the pixels each needs at 300 DPI:

Print sizePixels at 300 DPI
4 × 6 in (10 × 15 cm)1200 × 1800
5 × 7 in (about 13 × 18 cm)1500 × 2100
8 × 10 in (about 20 × 25 cm)2400 × 3000
A4 (21 × 29.7 cm)2480 × 3508
A3 (29.7 × 42 cm)3508 × 4961

A 12-megapixel photo of 4032 × 3024 pixels covers everything up to A4 at 300 DPI: 3024 ÷ 300 × 2.54 = 25.6 cm by 4032 ÷ 300 × 2.54 = 34.1 cm. For an A3 print the same photo gives about 240 DPI.

How to change image size in cm or pixels

  1. Open the photo in resize image. It shows the current size in pixels.
  2. Pick the unit. Choose pixels for a screen or upload size, or cm for a print size.
  3. Set the DPI if you chose cm. 300 for prints. The tool works out the pixels from it.
  4. Type the width and height. Leave the aspect ratio locked if you only know one side.
  5. Download and check. Open the new file and confirm its pixel size before you upload or print it.

Keeping the shape: aspect ratio and cropping

If the new size has a different shape from the photo, resizing alone squashes or stretches it. A 4:3 phone photo resized straight to 3.5 × 4.5 cm makes faces look thin, because 3.5 × 4.5 is a 7:9 shape.

  • Same shape: resize with the ratio locked and give one side; the other follows.
  • Different shape: crop first to the new ratio with crop image, then resize to the exact size.
TargetRatio to crop to
3.5 × 4.5 cm7:9
2 × 2 in or any square1:1
4 × 6 in or 10 × 15 cm2:3
A4 paperabout 1:1.414
1920 × 1080 screen16:9

Worked example: a form that gives cm and KB

Say a form asks for a photo of 3.5 × 4.5 cm, under 50 KB. The cm size tells you the shape and the pixels; the KB limit is separate:

  1. Crop the photo to a 7:9 shape around the face.
  2. Resize to 413 × 531 px, which is 3.5 × 4.5 cm at 300 DPI.
  3. Compress to a 48 KB target, leaving a little room under the limit.
  4. Check the saved file: 413 × 531 px and under 50 KB.

If the form gives pixels as well, use its pixels instead of working them out. If it gives only KB, any sensible size works; a smaller size in pixels makes a low KB target easier to reach with a sharp result.

Changing only the DPI

Some people are asked for a “300 DPI image”. If the file already has enough pixels for the print size, the DPI number in the file is only a label: printers and print shops use the size you ask for. A 1200 × 1800 file prints sharply at 4 × 6 inches whether it says 72 DPI or 300 DPI.

What matters is the pixel count. A 400 × 600 px image doesn’t become a sharp 4 × 6 inch print by being relabelled 300 DPI; it only has enough pixels for about 1.3 × 2 inches at that resolution.

On Windows, Mac and phones

  • Windows (Paint): open the photo, choose Resize, pick Pixels and type the new width. Paint works in pixels or percent, so convert cm with the formula above first.
  • Mac (Preview): choose Tools → Adjust Size. You can type width and height in pixels, centimetres, millimetres or inches, and set the resolution. Untick Resample image to change only the DPI and print size without touching the pixels.
  • iPhone and Android: gallery apps can crop but most can’t set an exact pixel size. A browser tool such as resize image works on phones the same way it does on a computer.

Keeping it sharp

  • Make images smaller, not bigger. Shrinking throws away pixels you don’t need. Enlarging invents pixels and looks soft.
  • Resize once, from the original. Each save as JPG loses a little quality.
  • Resize before you compress. If a form has a KB limit as well as a size, set the pixels first, then use compress image to reach the KB target.
  • Start from the original file. A copy sent through a messaging app has usually been made smaller and recompressed already. Resize the photo from your camera roll or the original scan instead.
  • Use PNG for screenshots and text. JPG blurs sharp edges; PNG keeps them crisp.

For upload limits in KB rather than size in cm, the guide to reducing image size in KB covers the steps.

Sources