Typography / mm → px
Convert Millimeters to CSS pixels
Convert absolute CSS lengths and desktop-publishing points. Convert Millimeters (mm) to CSS pixels (px). Find the formula, worked examples, unit definitions, and practical guidance below.
Reverse: CSS pixels to Millimeters →
How to convert millimeters to CSS pixels
These use CSS definitions: 1 inch = 96 CSS pixels = 72 points = 6 picas. A CSS pixel is not a physical screen pixel. Relative em, rem, and viewport units need a rendering context and are excluded.
Use x for the value in mm, b for the intermediate value in in, and y for the result in px.
px = mm × 0.03937007874015748 ÷ 0.010416666666666666
Worked examples
10 mm ≈ 37.7952755906 px
Step 1: (10 × 0.0393700787402) ≈ 0.393700787402 in.
Step 2: 0.393700787402 ÷ 0.0104166666667 ≈ 37.7952755906 px.20 mm ≈ 75.5905511811 px
Step 1: (20 × 0.0393700787402) ≈ 0.787401574803 in.
Step 2: 0.787401574803 ÷ 0.0104166666667 ≈ 75.5905511811 px.
Results are rounded to 12 significant digits. Converting units does not increase the precision of the original measurement. Very large or small values outside JavaScript’s finite numeric range are rejected.
About Millimeters
Millimeters (mm) measures typography under the conventions above. The base value in in is (x × 0.0393700787402), where x is the numerical value in mm. Factors shown here are rounded for display; calculations use the stored factor.
About CSS pixels
CSS pixels (px) measures typography under the conventions above. The base value in in is (x × 0.0104166666667), where x is the numerical value in px. Factors shown here are rounded for display; calculations use the stored factor.
Definitions and sources
Keep these unit conventions consistent when using measurements in construction calculations.
Millimeters to CSS pixels reference table
| Millimeters (mm) | CSS pixels (px) |
|---|---|
| 1 | 3.77952755906 |
| 5 | 18.8976377953 |
| 10 | 37.7952755906 |
| 25 | 94.4881889764 |
| 50 | 188.976377953 |
| 100 | 377.952755906 |
| 1000 | 3779.52755906 |
Browse every typography conversion →