Pixels, cm and DPI: how to convert, with tables
The formula for pixels to cm and inches, print sizes at 300, 350 and 600 dpi, how to check a photo's dpi, and why changing only the dpi tag changes nothing.
A form asks for a “300 dpi photo, 3.5 × 4.5 cm”. Your phone says the picture is 3024 × 4032. A print shop wants “at least 300 dpi for a 4 × 6”. These three numbers describe the same thing from three sides, and one short formula connects them. This guide gives the formula, the conversion tables worked out in full, and the answer to the question people actually come with: does changing the DPI setting of a photo do anything? (Mostly no, and below is a measured test.)
The formula
A pixel is a dot in the image. DPI (dots per inch, also written PPI for pixels per inch) says how many of those dots are laid side by side in one inch when the image is printed. Everything else follows from that:
- pixels = inches × dpi
- pixels = cm ÷ 2.54 × dpi, or mm ÷ 25.4 × dpi
- dpi = pixels ÷ inches
- print size in cm = pixels ÷ dpi × 2.54
Useful constants: at 300 dpi, 1 cm is 118.1 px and 1 mm is 11.8 px. At 150 dpi, 1 cm is 59.1 px. At 72 dpi, 1 cm is 28.3 px.
An image file has a pixel size and nothing else that matters here. It has no centimetres until you decide how big to print it. That is why one photo can be “10 cm wide at 300 dpi” and “20 cm wide at 150 dpi” without a single pixel changing.
Print sizes in pixels
Pixels needed to print at full quality (width × height, rounded to whole pixels):
| Print size | 300 dpi | 350 dpi | 600 dpi |
|---|---|---|---|
| 24 × 30 mm | 283 × 354 | 331 × 413 | 567 × 709 |
| 30 × 40 mm | 354 × 472 | 413 × 551 | 709 × 945 |
| 35 × 45 mm | 413 × 531 | 482 × 620 | 827 × 1063 |
| 2 × 2 in (50.8 mm) | 600 × 600 | 700 × 700 | 1200 × 1200 |
| L, 89 × 127 mm | 1051 × 1500 | 1226 × 1750 | 2102 × 3000 |
| 4 × 6 in (10 × 15 cm) | 1200 × 1800 | 1400 × 2100 | 2400 × 3600 |
| 5 × 7 in | 1500 × 2100 | 1750 × 2450 | 3000 × 4200 |
| A5, 148 × 210 mm | 1748 × 2480 | 2039 × 2894 | 3496 × 4961 |
| A4, 210 × 297 mm | 2480 × 3508 | 2894 × 4093 | 4961 × 7016 |
300 dpi is the usual target for photo prints. Print shops sometimes ask for more, and 600 dpi mostly matters for line art and scans of documents, not for photos. For a photo print the extra pixels beyond that rarely show.
What your photo’s pixels will print as
The other direction: you have an image, and want to know how large it prints.
| Image | 72 dpi | 150 dpi | 300 dpi | 600 dpi |
|---|---|---|---|---|
| 4032 × 3024 (12 MP phone) | 142.2 × 106.7 cm | 68.3 × 51.2 cm | 34.1 × 25.6 cm | 17.1 × 12.8 cm |
| 2048 × 1536 (3 MP) | 72.2 × 54.2 cm | 34.7 × 26.0 cm | 17.3 × 13.0 cm | 8.7 × 6.5 cm |
| 1920 × 1080 | 67.7 × 38.1 cm | 32.5 × 18.3 cm | 16.3 × 9.1 cm | 8.1 × 4.6 cm |
| 1280 × 720 | 45.2 × 25.4 cm | 21.7 × 12.2 cm | 10.8 × 6.1 cm | 5.4 × 3.0 cm |
| 413 × 531 | 14.6 × 18.7 cm | 7.0 × 9.0 cm | 3.5 × 4.5 cm | 1.7 × 2.2 cm |
A 12 MP phone photo has plenty of pixels for any ordinary print. Stretched over the long side of an A4 sheet (297 mm) it comes to about 345 dpi, and over the long side of an L print (127 mm) about 806 dpi. The photo is almost never the limit. The limit is a small copy that someone saved from a chat app or website, which can be 1280 pixels wide and prints at about 11 cm at 300 dpi.
Changing the DPI tag does not change the picture
A JPEG or PNG can carry a number labelled “resolution” in its header. It is a note about how large the file would like to be printed. It is not part of the image. To check, we made a 4032 × 3024 JPEG in Chrome, then rewrote only that header number to 72, 150, 300 and 600 dpi and compared the results:
| DPI tag | File size | Pixels | Decoded image |
|---|---|---|---|
| 72 | 880,368 bytes | 4032 × 3024 | identical |
| 150 | 880,368 bytes | 4032 × 3024 | identical |
| 300 | 880,368 bytes | 4032 × 3024 | identical |
| 600 | 880,368 bytes | 4032 × 3024 | identical |
Same bytes, same pixels, same look. (The JPEG Chrome saves from a canvas has no resolution set at all, so there was no real value to start from.) Editing the tag only changes how a print program decides the default print size. That is useful when a program ignores your size settings, and useless for anything else.
Two consequences:
- “Change DPI to 300” does not make a photo sharper. If a 600 × 400 image is relabelled 300 dpi, it still prints at 5 × 3.4 cm. To print it at 10 cm wide you would need 1181 real pixels, which only a better original can give you. Enlarging the existing pixels adds no detail.
- A form that asks for 300 dpi almost always checks pixels. The Korean passport office, for example, recommends 413 × 531 pixels and “300 dpi” in the same breath, and 413 pixels at 300 dpi is exactly 3.5 cm. If the pixel size is right, the dpi is right.
How to check a photo’s size and dpi
Windows. Right-click the file, choose Properties, then the Details tab. Under Image you see Dimensions (the pixel size), and Horizontal and Vertical resolution (the dpi tag).
Mac. Open the file in Preview. Tools, then Adjust Size shows the width and height in pixels and the Resolution. If you untick Resample Image, changing the resolution only rewrites the tag and leaves the pixels alone, which is exactly the experiment above. Tools, then Show Inspector, also lists it.
iPhone and Android. The Photos or Gallery info screen (swipe up on the photo, or tap the info button) shows the pixel size and the file size, but no dpi. That is fine: phone photos usually carry an old default such as 72 dpi, and it means nothing. Go by the pixel size.
ID photos: the pixel sizes that come up most
| Photo | Physical size | Pixels at 300 dpi |
|---|---|---|
| Passport (Korea, Japan, UK), Schengen | 35 × 45 mm | 413 × 531 |
| US passport and visa | 2 × 2 in | 600 × 600 |
| Resume or half-card (Korea, Japan) | 30 × 40 mm | 354 × 472 |
| Japanese driver’s licence | 24 × 30 mm | 283 × 354 |
Online applications often replace these with a rule of their own, such as “at least 600 × 750 px” for UK online applications or “600 to 1200 px square, up to 240 KB” for a US visa. The official numbers for each country are in ID and passport photo sizes.
When to resize, and when not to
- Resize down when a form wants a specific pixel size, or when you are sending a photo by email and 4032 pixels is far more than anyone will see. Going down is safe: Hanji shrinks large photos in several halving steps, which keeps edges sharper than one big jump.
- Do not resize up to reach a print or upload size. If the pixels do not exist, stretching them only makes a larger blurry image. Find the original instead.
- Resize before compressing. If a file is too big in KB, first reduce the pixel size to what the target needs, then use the compressor. The size limit guide has measured numbers: photo too large to upload.
- Do not use a resize for the head-size rule. For passport photos, make the photo in the ID photo maker or one of the country pages first, then resize only if the form asks for a different pixel size.
Doing it with Hanji
Convert the physical size to pixels with the formula above, open Resize Image, choose Width and height, and enter the numbers. With Keep aspect ratio on, the picture fits inside the size you give, so one side is enough. If the result is over a KB limit, run it through Compress Image. Hanji’s tools work on pixels, and they have no setting for the dpi tag. Nothing is uploaded, so ID photos and scans stay on your device.
Guides
- Photo too large to upload? How file size limits work
- HEIC photos from iPhone: why forms reject them and fixes
- JPG, PNG, WebP, AVIF and HEIC compared
- How to Make a PDF Smaller (and What You Give Up)
- Scan Documents to PDF with Your Phone
- ID and passport photo sizes in mm and pixels
- How to Take a Passport Photo at Home That Gets Accepted
- Photo file rules for online applications: pixels, KB and age
- Do Online File Converters Keep Your Files?
- Print Passport Photos on 4×6: CVS, Walgreens, Walmart
- Character and Word Counts: Why Counters Disagree
- QR Codes That Keep Working: Static, Dynamic and Print
- Email Attachment Size Limits: Gmail, Outlook, Yahoo, iCloud
- Why Text Extraction From Photos Goes Wrong, and How to Fix It
- Shrinking Images to a File Size: What We Measured