Skip to main content
Screendesk
Free tool

PX to REM Converter

Convert px to rem and rem to px at any root font size, with em, pt, and vw equivalents and a full 1–96px table.

Open source on GitHub

Convert

px

Browsers default to 16px. Change it if your html element sets another font-size.

px
rem
px

Result

24px at a 16px root

1.5rem

rem1.5rem
em (parent at root size)1.5em
pt18pt
% of root150%
vw at 1440px wide1.6667vw

1–96px at a 16px root

Pixels to rem conversion table
pxrempt
1px0.0625rem0.75pt
2px0.125rem1.5pt
3px0.1875rem2.25pt
4px0.25rem3pt
5px0.3125rem3.75pt
6px0.375rem4.5pt
7px0.4375rem5.25pt
8px0.5rem6pt
9px0.5625rem6.75pt
10px0.625rem7.5pt
11px0.6875rem8.25pt
12px0.75rem9pt
13px0.8125rem9.75pt
14px0.875rem10.5pt
15px0.9375rem11.25pt
16px1rem12pt
17px1.0625rem12.75pt
18px1.125rem13.5pt
19px1.1875rem14.25pt
20px1.25rem15pt
21px1.3125rem15.75pt
22px1.375rem16.5pt
23px1.4375rem17.25pt
24px1.5rem18pt
25px1.5625rem18.75pt
26px1.625rem19.5pt
27px1.6875rem20.25pt
28px1.75rem21pt
29px1.8125rem21.75pt
30px1.875rem22.5pt
31px1.9375rem23.25pt
32px2rem24pt
33px2.0625rem24.75pt
34px2.125rem25.5pt
35px2.1875rem26.25pt
36px2.25rem27pt
37px2.3125rem27.75pt
38px2.375rem28.5pt
39px2.4375rem29.25pt
40px2.5rem30pt
41px2.5625rem30.75pt
42px2.625rem31.5pt
43px2.6875rem32.25pt
44px2.75rem33pt
45px2.8125rem33.75pt
46px2.875rem34.5pt
47px2.9375rem35.25pt
48px3rem36pt
49px3.0625rem36.75pt
50px3.125rem37.5pt
51px3.1875rem38.25pt
52px3.25rem39pt
53px3.3125rem39.75pt
54px3.375rem40.5pt
55px3.4375rem41.25pt
56px3.5rem42pt
57px3.5625rem42.75pt
58px3.625rem43.5pt
59px3.6875rem44.25pt
60px3.75rem45pt
61px3.8125rem45.75pt
62px3.875rem46.5pt
63px3.9375rem47.25pt
64px4rem48pt
65px4.0625rem48.75pt
66px4.125rem49.5pt
67px4.1875rem50.25pt
68px4.25rem51pt
69px4.3125rem51.75pt
70px4.375rem52.5pt
71px4.4375rem53.25pt
72px4.5rem54pt
73px4.5625rem54.75pt
74px4.625rem55.5pt
75px4.6875rem56.25pt
76px4.75rem57pt
77px4.8125rem57.75pt
78px4.875rem58.5pt
79px4.9375rem59.25pt
80px5rem60pt
81px5.0625rem60.75pt
82px5.125rem61.5pt
83px5.1875rem62.25pt
84px5.25rem63pt
85px5.3125rem63.75pt
86px5.375rem64.5pt
87px5.4375rem65.25pt
88px5.5rem66pt
89px5.5625rem66.75pt
90px5.625rem67.5pt
91px5.6875rem68.25pt
92px5.75rem69pt
93px5.8125rem69.75pt
94px5.875rem70.5pt
95px5.9375rem71.25pt
96px6rem72pt

Runs entirely in your browser. Nothing you type here is uploaded or stored.

CSS units

px, rem, em, pt, and vw compared. What each unit is relative to, and when to use it.

CSS length units
UnitRelative toUse it for
pxA CSS pixel, 1/96 of an inchBorders, shadows, and details that should not scale with text.
remMultiple of the root (html) font sizeFont sizes, spacing, and layout. Respects the visitor’s browser font-size setting.
emMultiple of the parent element’s font sizePadding that should scale with a component’s own text. Compounds when nested: 1.2em inside 1.2em is 1.44× the root.
ptA point, 1/72 of an inch (1px = 0.75pt)Print stylesheets and handing values to designers who work in points.
vw1% of the viewport widthFluid type and full-bleed layouts. Combine with rem in clamp() so text never gets too small to read.
%Relative to the parent (font-size: % uses the parent font size)Widths in fluid layouts; font-size: 62.5% on html makes 1rem = 10px.
Reference

A common type scale in rem and px. Tailwind CSS font sizes at a 16px root.

Tailwind CSS font sizes in rem and px
Classrempx
text-xs0.75rem12px
text-sm0.875rem14px
text-base1rem16px
text-lg1.125rem18px
text-xl1.25rem20px
text-2xl1.5rem24px
text-3xl1.875rem30px
text-4xl2.25rem36px
text-5xl3rem48px
text-6xl3.75rem60px
FAQ

Frequently asked questions

How do I convert px to rem?

Divide the pixel value by the root font size. With the browser default of 16px, 24px ÷ 16 = 1.5rem and 14px ÷ 16 = 0.875rem. If your stylesheet sets a different font-size on the html element, enter it as the root font size above and every value, including the 1–96px table, updates.

How do I convert rem to px?

Multiply the rem value by the root font size: 1.5rem × 16 = 24px, and 2.25rem × 16 = 36px. Type into the Rem field above to convert in that direction.

What is the difference between rem and em?

rem is always relative to the root html element’s font size, so 1rem is the same everywhere on the page. em is relative to the font size of the element’s parent, so it compounds when elements are nested. Use rem for predictable sizing and em when spacing should scale with a component’s own text.

Why use rem instead of px for font sizes?

Visitors can change the default font size in their browser settings, and rem values follow that choice while px values ignore it. Using rem for type and spacing keeps your layout readable for people who need larger text, which also helps you meet WCAG text-resize guidance.

Should I set html { font-size: 62.5% }?

It makes 1rem equal 10px at the default browser setting, so mental math is easier (1.4rem = 14px). It still respects the visitor’s font-size setting because it is a percentage. The trade-off is that third-party components expecting 1rem = 16px will render smaller, so set the root font size to 10 here if you use it.

Customer support runs on Screendesk.

Start for free