utilobox

ID photo size in pixels and mm, worked out with real numbers

A form asks for millimeters, an upload box asks for pixels, and a print shop talks about dpi. This guide shows the one formula that connects them, with numbers taken from the presets in this tool, so you can tell what a given ID photo size in pixels and mm really means.

Last updated:

The one formula behind every ID photo size

Millimeters describe paper. Pixels describe a screen file. The bridge between them is dots per inch, written dpi. One inch is 25.4 mm, so pixels equal millimeters divided by 25.4, multiplied by the dpi. The tool saves print files at 300 dpi, so the shortcut is about 11.8 pixels for every millimeter.

Take a 30 × 40 mm photo, the size of the 3 × 4 cm preset. Thirty divided by 25.4 is 1.18 inches, times 300 is 354 pixels. Forty divided by 25.4 is 1.57 inches, times 300 is 472 pixels. So the picture is 354 × 472 pixels. Nothing else is needed: if you can do that one line of arithmetic, you can read any ID photo size in pixels and mm.

Worked examples from the presets

Here is the same calculation for sizes that appear in the preset list. The tool rounds each side to a whole pixel, so your own result may differ by one from a hand calculation.

A 26 × 32 mm photo, used by one of the Spanish presets, comes to 307 × 378 pixels. A 33 × 48 mm photo, used by the China presets, is 390 × 567 pixels. A 35 × 45 mm photo is 413 × 531 pixels, and a 51 × 51 mm square (2 × 2 inches) is 602 × 602 pixels. The larger 50 × 70 mm general size is 591 × 827 pixels.

Notice that 413 × 531 and 354 × 472 have the same shape as their millimeter sizes, but only roughly: pixels are whole numbers, so a ratio of 35 to 45 becomes 413 to 531. That tiny rounding is normal and no office measures at that precision.

  • 30 × 40 mm becomes 354 × 472 px
  • 35 × 45 mm becomes 413 × 531 px
  • 33 × 48 mm becomes 390 × 567 px
  • 51 × 51 mm becomes 602 × 602 px

What the dpi number does and does not change

A common misunderstanding is that a higher dpi makes a photo sharper. It does not by itself. The pixel count is what the file contains; dpi is only a note that tells a print program how large each pixel should be on paper. The tool writes 300 dpi into every JPG it saves, so print programs know the real size.

You can see the effect with the same 35 mm width: at 150 dpi it needs 207 pixels, at 300 dpi 413 pixels, at 600 dpi 827 pixels. Printing 413 pixels at 150 dpi would give a 70 mm wide picture, double the size you wanted. That is why you should check size on paper with a ruler, not by reading the dpi.

Online files are different. A 1200 × 1200 pixel file tagged 300 dpi would be 101.6 mm wide if printed, twice the 51 mm of the US square. For files made to be uploaded, the pixel count is the rule and the dpi tag is irrelevant. Do not print a file that was made for an upload box.

When a form asks for pixels instead of millimeters

The ID photo size in pixels is not always the print size at 300 dpi, because some presets carry their own online file rule. Choose a country and a document, press ‘Show size and rules’, and the row ‘Online file’ lists the pixels and, where there is one, a size limit. The presets in this tool include a 1200 × 1200 pixel file for the US visa form, 900 × 1157 for the UK passport, 420 × 560 for the China visa, 1000 × 1000 for the India e-Visa and 413 × 531 for a Korean passport file.

A few of these are digital only, so the card shows pixels and no millimeter size. Others, like the China visa, show both: the print is 33 × 48 mm, but the upload file is 420 × 560 pixels, a slightly different shape from the print. The tool frames the face for the file's own shape, so use ‘Save file’ for an upload and ‘Save print sheet’ for paper, not one for the other.

These numbers come from the rules as the tool was prepared. Offices change them, so read the current instruction on the page where you upload, and trust it over any preset.

File size limits in KB

Some uploads also cap the file weight. In the presets, the US visa file is up to 240 KB, the Korean driver licence file up to 250 KB, the India e-Visa between 10 and 300 KB, and the China visa between 40 and 120 KB. The UK passport lists 50 KB to 10,240 KB, which is 10 MB.

When there is a maximum, the tool keeps the pixel size and lowers the JPG quality step by step until the file fits, using the highest quality that stays within the limit. It never shrinks the pixel dimensions to meet a limit. The line after saving shows pixels and KB, so read it before you upload. The tool does not pad a file that is below a stated minimum, so if a form lists a minimum, check that too.

If you want to compare, you can run a saved file through ‘Compress image’, but it re-encodes the picture a second time, which costs a little detail. It is usually better to let the ID photo tool do the limit in one pass.

Common mistakes when converting an ID photo size

The first mistake is mixing inches and centimeters. A 3 × 4 photo in this tool means 30 × 40 mm, not inches. A 2 × 2 inch photo is 51 mm, not 50, and the difference matters: 50 mm is 591 pixels while 51 mm is 602 at 300 dpi.

The second is stretching. If a form wants a 3:4 picture and you take a 35 × 45 photo and set both width and height in ‘Resize image’, the face is squeezed. Resizing keeps shape only when you change one side and let the other follow. ‘Crop image’ with the ratio you need is the safer way to change shape, because it removes edges instead of distorting the face.

The third is too few pixels. The tool compares the face area with the pixels needed and warns that the face is small when the source is too low in resolution. A photo from far away, cropped hard, cannot be enlarged back to detail. Retake it closer or with a higher quality camera setting.

The fourth is printing at the wrong scale. Even a file with the right dpi tag prints too small or too big if the print dialog says ‘fit to page’. Print at actual size and measure one photo.

Check the ID photo size before you use it

Do three quick checks. First, divide the file width in pixels by 11.8 to estimate millimeters at 300 dpi: 413 pixels gives 35 mm. Second, for a printed sheet, measure one photo with a ruler, since a 4×6 in sheet is 1200 × 1800 pixels at 300 dpi and an A4 sheet 2480 × 3508. Third, compare the head rule on the card with your picture.

Every ID photo size in pixels and mm here is only what the preset in this tool uses, and some sizes are customary rather than official. The issuing office decides, and it may have a newer rule, so check its current page before you order prints or upload. Some countries do not accept a self-made photo for the main document at all; the tool tells you when that is the case. Nothing here promises that a photo will be accepted. For official documents the tool does not retouch the picture, and you should not either.

Questions and answers

How many pixels is a 35 × 45 mm photo?

At 300 dpi it is 413 × 531 pixels, from 35 ÷ 25.4 × 300 and 45 ÷ 25.4 × 300. At 600 dpi the same photo is about 827 × 1063 pixels, and at 150 dpi about 207 × 266.

Is 3 × 4 cm the same as 3 × 4 inches?

No. In this tool a 3 × 4 photo is 30 × 40 mm, which is 354 × 472 pixels at 300 dpi. Three by four inches would be 76 × 102 mm, far larger.

Does a higher dpi make my ID photo better?

Not by itself. Quality comes from the number of real pixels in the face. The dpi only tells a printer how big to print them, so a photo that is soft stays soft at any dpi.

Why is my saved file smaller in pixels than I expected?

Some presets use the pixel size of an online form instead of the print size at 300 dpi. Press ‘Show size and rules’ and read the ‘Online file’ row to see which one applies.

Can I just resize an old ID photo to a new size?

Only if the shape is the same. Changing width and height separately distorts the face, and enlarging a small file adds no detail. Start from the original photo and make it again for the new preset.