Length Converter
Meters, feet, inches, miles, km, and more.
This PX to REM converter turns pixel values from a design into rem units for your CSS, and back. Change the root font size if your site doesn't use the default 16px, and get em and pt as well.
| px | rem | pt |
|---|
rem = px ÷ root font size em = px ÷ parent font size pt = px × 3/4 (1pt = 4/3 px)
With the default 16px root, 1rem is 16px, so 24px is 24 ÷ 16 = 1.5rem.
| px | rem | pt |
|---|---|---|
| 10px | 0.625rem | 7.5pt |
| 12px | 0.75rem | 9pt |
| 14px | 0.875rem | 10.5pt |
| 16px | 1rem | 12pt |
| 18px | 1.125rem | 13.5pt |
| 20px | 1.25rem | 15pt |
| 24px | 1.5rem | 18pt |
| 28px | 1.75rem | 21pt |
| 32px | 2rem | 24pt |
| 36px | 2.25rem | 27pt |
| 40px | 2.5rem | 30pt |
| 48px | 3rem | 36pt |
| 56px | 3.5rem | 42pt |
| 64px | 4rem | 48pt |
Many people raise the default font size in their browser to read more comfortably. Sizes in rem follow that setting, while sizes in px ignore it. Using rem for font sizes, and often for spacing too, keeps a layout readable for those users without extra work. em is useful for things that should scale with their own text, such as padding inside a button.
Divide by the root font size. With 16px, 20px ÷ 16 = 1.25rem.
rem is relative to the root (html) font size; em is relative to the font size of the element's parent, so em values compound when nested.
16px in every major browser unless the site or the user changes the root font size.
Often used together with the PX to REM Converter.
Meters, feet, inches, miles, km, and more.
Minifies CSS and shows the size saving, raw and gzipped.
Beautifies CSS with one declaration per line and consistent indentation.