Task Flow Hub
Home / Free tools / PX to REM Converter

Pixels to rem and em converter

Enter a size and your base font size to get the matching px, rem and em values.

About this tool

The formula. rem = px divided by the root font size. With the usual 16px base, 24px is 1.5rem.

em is relative to the parent. The em value shown is correct only when the element's parent has the same font size as the base you entered. Nested elements can compound.

Why rem. Sizes in rem scale when a visitor changes their browser's default font size, which helps readability.

Set your own base. If your CSS changes the root font size, enter that value instead of 16.

Frequently asked questions

What is the default browser font size?

16px in most browsers, unless the user changed it.

Should I use rem for everything?

Rem suits font sizes and spacing that should follow user settings. Borders and very fine details are often left in px.

Does this work with decimals?

Yes. Results are rounded to four decimal places.

More free tools

Explore more free tools or see our services.