Unit-To-Unit Pixels conversion

Pixel & CSS Unit Converter

1 CSS pixel = 0.0625 rem

CSS defines its absolute units against a reference pixel of 1/96 inch, so px, pt, pc, in, cm and mm all convert exactly — one inch is 96 px, one point is 4/3 px. Font-relative units are the exception: rem and em depend on the root font size, which defaults to 16 px in every browser but is frequently changed. The root font size is editable on the live converter so a design system on a 10 px or 62.5 percent root converts correctly.

Formula rem = px ÷ root font size (default 16)

Pixels

17 units, base CSS pixel at 96 DPI. px by default.
px — drives rem, em and sp
Convert from
Results update on every keystroke.
=1 css pixel equals
Decimals 6
Equals to
0.062500
Root emrem
0.062500
Emem
0.750000
Pointpt
0.062500
Picapc
0.010417
Inch (96 DPI)in
0.026458
Centimetrecm
0.264583
Millimetremm
1.058333
Quarter-millimetreQ
15.000000
Twiptwip
1.000000
Android dp (160 dpi)dp
1.000000
Android sp (1 sp = root/16)sp
1.000000
iOS pointpt (iOS)
2.000000
Device pixel @2xpx @2x
3.000000
Device pixel @3xpx @3x
0.750000
Print pixel (72 DPI)px @72dpi
3.125000
Print pixel (300 DPI)px @300dpi
CSS pixel to Root em — quick reference
CSS pixelRoot em
1 px0.0625 rem
2 px0.125 rem
3 px0.1875 rem
5 px0.3125 rem
10 px0.625 rem
25 px1.5625 rem
50 px3.125 rem
100 px6.25 rem
250 px15.625 rem
500 px31.25 rem
1000 px62.5 rem

Learn more

Related guides: Digital and print layout units: px, rem, em, points and DPI

Frequently asked

How many px is 1rem?
16 px at the browser default root font size. Change the root size on the converter above if your stylesheet overrides it.
What is the difference between px and dp?
A CSS px and an Android dp are both density-independent references — 1 dp = 1 px at 160 dpi. Physical device pixels differ by the screen density factor (@2x, @3x).
How do I convert px to mm for print?
At the CSS reference of 96 DPI, 1 px = 0.264583 mm. For real print output, divide by your actual DPI — a 300 DPI pixel is 0.0846 mm.