CSS Unit Converter
1
Reference Values
16 px in all units
px
16
rem
1
em
1
pt
12
vw
0.833333
vh
1.481481
%
100
in
0.166667
cm
0.423333
mm
4.233331
About the CSS Unit Converter
Convert between px, rem, em, vw, vh, pt, and more CSS units. Set base font size and viewport for accurate conversions.
The CSS Unit Converterruns entirely in your browser — your data is never uploaded to a server, so it stays private and works instantly, even offline. It's completely free, requires no sign-up, and works on desktop and mobile.
Frequently Asked Questions
- How do I convert px to rem?
- Enter the pixel value and set your base font size (default 16px). The tool calculates the rem equivalent. For example, 32px with a 16px base = 2rem.
- What is the difference between rem and em?
- rem is relative to the root (html) font size, while em is relative to the parent element font size. rem is more predictable for consistent sizing across your page.