TTKTheTextKit

PX to REM Converter

Enter a size in px, rem, em, pt, pc, vw or percent and see it in every other unit at once, ready to paste into CSS. Set your own root font size, the font size of the parent element and the viewport width, because rem, em and vw all depend on them. A table lists common pixel sizes in rem at your root size. Everything runs in your browser.

What 1rem is. Browsers use 16.

What 1em and 100% are. Empty means the root size.

What 100vw is.

px
24px
rem
1.5rem
em
1.5em
pt
18pt
pc
1.5pc
vw
1.6667vw
%
150%

Common sizes at a 16px root

8px0.5rem
10px0.625rem
12px0.75rem
14px0.875rem
16px1rem
18px1.125rem
20px1.25rem
24px1.5rem
28px1.75rem
32px2rem
36px2.25rem
40px2.5rem
48px3rem
56px3.5rem
64px4rem
72px4.5rem
80px5rem
96px6rem

Related Tools

[5 suggestions]

About the PX to REM Converter

The px to rem converter divides a pixel size by the root font size, which is 16px in browsers unless a page changes it. So 24px is 1.5rem, and at a root size of 10px, which some sites use, 24px is 2.4rem. The other units follow the CSS definitions. An inch is 96 px, a point is 1/72 of an inch, so 12pt is 16px, and a pica is 16px. An em is the font size of the parent element, so it can differ from a rem inside nested elements. A percent in a font size is also a share of the parent font size, and vw is one percent of the viewport width. Results are written with up to four decimals and no trailing zeros. A root, parent or viewport size of zero has no meaningful answer, and the tool shows n/a instead of infinity. The conversions were compared with the computed sizes of Chromium for thousands of random values and match. Everything runs in your browser and nothing is uploaded.

How do I convert px to rem?▾

Divide the pixel size by the root font size. With the browser default of 16px, 16px is 1rem, 24px is 1.5rem and 8px is 0.5rem. If your CSS sets html to a different size, enter that size as the root font size and the tool does the division for you.

What is the difference between rem and em?▾

A rem is relative to the root font size of the page, so it is the same everywhere. An em is relative to the font size of the parent element, so it can change from one nested element to the next. Use rem for consistent spacing and sizes, and em when something should scale with its own container text.

How many px is 1pt?▾

One point is 4/3 of a pixel, about 1.3333px, because CSS defines an inch as 96px and a point as 1/72 of an inch. So 12pt is 16px and 10pt is about 13.3333px.

Why use rem instead of px?▾

Sizes in rem follow the root font size, so they grow when a visitor raises the default text size in their browser. Sizes in px do not. That is why rem is often used for font sizes and spacing.

Is my data uploaded?▾

No. The conversion runs in your browser, and the values you type are not sent anywhere or stored.