Unit Converter

Convert between CSS units: px, rem, em, vh, and more.

px
16px
rem
1rem
em
1em
vw
0.8333vw
vh
1.4815vh
pt
12pt
%
100%

Quick Reference Table

pxremempt
8px0.5rem0.5em6pt
10px0.625rem0.625em7.5pt
12px0.75rem0.75em9pt
14px0.875rem0.875em10.5pt
16px1rem1em12pt
18px1.125rem1.125em13.5pt
20px1.25rem1.25em15pt
24px1.5rem1.5em18pt
28px1.75rem1.75em21pt
32px2rem2em24pt
36px2.25rem2.25em27pt
40px2.5rem2.5em30pt
48px3rem3em36pt
56px3.5rem3.5em42pt
64px4rem4em48pt
72px4.5rem4.5em54pt
80px5rem5em60pt
96px6rem6em72pt

Frequently Asked Questions

What is the difference between rem and em in CSS?

rem is always relative to the root <html> element's font size (default 16px). em is relative to the parent element's font size. rem is more predictable and avoids compounding issues.

Why is 16px the default base font size?

All major browsers set the default root font size to 16px, making 1rem = 16px. You can customize the base size in this tool to match your project.

When should I use vw and vh viewport units?

Viewport units are ideal for full-screen sections, fluid typography, and layouts that scale proportionally with the browser window.

How do I convert px to rem?

Divide your pixel value by the root font size (usually 16). For example, 24px / 16 = 1.5rem. This tool does the math instantly.

What is the quick reference table for?

The reference table shows common font and spacing sizes with their rem, em, and pt equivalents pre-calculated at your configured base font size.