px to rem converter
Convert CSS units px, rem, em, pt and % with a configurable base.
- Instant
- Free
- Private (processed locally)
- No sign-up
Convert CSS units in an instant
Enter a value and its unit, choose the base (root font size, 16 by default) and get the equivalents in px, rem, em, pt and %. Click a value to copy it.
-
Enter the value
And its starting unit.
-
Set the base
The root font size (16px by default).
-
Copy the unit you need
One click copies the CSS-ready value.
Equivalents (16px base)
| px | rem | em | pt | % |
|---|---|---|---|---|
| 16 | 1 | 1 | 12 | 100 |
| 24 | 1.5 | 1.5 | 18 | 150 |
| 8 | 0.5 | 0.5 | 6 | 50 |
| 32 | 2 | 2 | 24 | 200 |
Relations: 1 rem = base px; 1 px = 0.75 pt; % = px ÷ base × 100. Everything is computed locally.
Frequently asked questions
What is the difference between px, rem and em?
px is a fixed size. rem is relative to the root element’s font size (html), 16px by default. em is relative to the parent’s font size. Here the base you set is the reference for rem, em and %.
Why use rem rather than px?
rem respects the font-size the user chose in their browser: your site stays readable and accessible when someone increases the default size. It is recommended for fonts and many spacings.
How do you go from px to pt?
In CSS, 1px = 1/96 inch and 1pt = 1/72 inch, so 1px = 0.75pt. With a base of 16, 16px = 12pt. pt is mainly used for print.
What is 1 rem?
1 rem = the root font size. With the default base of 16, 1 rem = 16px = 100%. If you set the base to 10, 1 rem = 10px, which simplifies the maths (1.6 rem = 16px).