Millimeters to Pixels Converter

Convert millimeters to pixels at 72, 96, 150, or 300 DPI.

Enter a positive number
DPI must be greater than zero
Pixels
37.80
px at 96 DPI
Inches
0.3937 in
Rounded pixels
38 px
Formula
px = mm / 25.4 × DPI = 10 / 25.4 × 96 = 37.80 px

Reference table at 96 DPI

MillimetersInchesPixels (96 DPI)
1 mm0.0394 in3.78 px
5 mm0.1969 in18.90 px
10 mm0.3937 in37.80 px
25 mm0.9843 in94.49 px
50 mm1.9685 in188.98 px
100 mm3.9370 in377.95 px
210 mm (A4 short side)8.2677 in793.70 px
297 mm (A4 long side)11.6929 in1122.52 px

How it works

Why is the conversion based on DPI?

Millimeters measure physical length, while pixels are a digital unit that only maps to a physical size through device resolution. DPI (dots per inch) tells the converter how many pixels fit into one inch of output. Change the DPI and the same 10 mm button becomes 28 px at 72 DPI, 38 px at 96 DPI, or 118 px at 300 DPI — the formula mm ÷ 25.4 × DPI relies on the fact that 1 inch equals exactly 25.4 mm.

Which DPI should I pick — 72, 96, 150 or 300?

For CSS and modern web layouts use 96 DPI — this is the reference ratio defined by the CSS spec, where 1 in = 96 px regardless of the physical screen. 72 DPI is a legacy print-era value still found in older Mac workflows and PDF typography. Use 150 DPI for draft print or Retina mockups, and 300 DPI when preparing artwork for offset print, brochures, or editorial layouts where sharp edges matter.

Do screen pixels match physical millimeters?

Not directly. CSS treats 1 px as 1/96 of an inch (about 0.2646 mm) as a reference, but the actual physical size depends on the device's pixel density. A 27-inch 4K monitor renders CSS pixels at roughly 163 physical dots per inch, so a 10 mm CSS-based element will measure slightly less than 10 mm on the glass. For precise physical sizing use print units (mm, cm) inside a print stylesheet.

How do I convert pixels back to millimeters?

Invert the formula: mm = px × 25.4 / DPI. For example, a 120 px icon at 96 DPI equals 120 × 25.4 / 96 = 31.75 mm. At 300 DPI the same 120 px block would print at just 10.16 mm, which is why print artwork needs higher DPI to preserve perceived detail at the intended physical size.

Why does A4 width (210 mm) show 793.70 px?

At 96 DPI an A4 sheet measures 210 × 25.4 / 96 ≈ 793.70 px wide and 297 × 25.4 / 96 ≈ 1122.52 px tall — these are the CSS reference dimensions used by browsers when rendering @page rules. At 300 DPI the same A4 sheet needs 2480 × 3508 px for print-ready output, which is why print-ready PDFs are significantly heavier than screen mockups.

Does the calculator work with decimal millimeter values?

Yes. Enter values like 0.5, 1.25 or 3.175 to convert sub-millimeter measurements — useful for stroke widths, border thicknesses, or bleed margins. The output keeps two decimal places for precise CSS use and also shows a rounded integer pixel value for cases where the rendering pipeline snaps to whole pixels.

This converter turns millimeters into pixels using the formula px = mm / 25.4 × DPI, where 1 inch equals exactly 25.4 mm. Pick a DPI preset (72, 96, 150 or 300) or enter a custom value to match your render pipeline — 96 DPI is the CSS reference and the right choice for web layouts.

Enter the millimeter value, choose DPI and read the pixel result, the inch equivalent and a rounded integer. Example: a 10 mm CSS button at 96 DPI renders as 37.80 px (≈ 38 px snapped). A4 paper width of 210 mm maps to 793.70 px at 96 DPI for screen mockups, or 2480 px at 300 DPI for print-ready artwork. Use the reference table below for common sizes.