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.
Common sizes at a 16px root
Related Tools
[5 suggestions]Color Converter and Contrast Checker
Convert a color between HEX, RGB and HSL, look up CSS color names, and check the WCAG contrast ratio of text on a background.
Developer & WebNumber Base Converter
Convert whole numbers between binary, octal, decimal, hex and any base from 2 to 36, with two's complement.
Developer & WebPercentage Calculator
Find a percentage of a number, what percent one number is of another, a percentage increase or decrease, or a number raised or lowered by a percentage.
Math & MoneyAspect Ratio Calculator
Find the aspect ratio of any width and height, resize while keeping it, and get the CSS aspect-ratio rule.
Developer & WebCSS Shadow Generator
Design box-shadow, text-shadow and drop-shadow with several layers, preview them live and copy the CSS.
Developer & WebAbout 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.