PX to REM / REM to PX Converter

Convert between pixel and rem CSS units instantly.

100% Free · No Sign-up · Runs in Your Browser

24px = 1.5rem
Equivalent

About the PX to REM / REM to PX Converter

REM units in CSS are relative to the root element's font size (typically 16px by default), making them ideal for scalable, accessible typography and spacing that respects a user's browser font size preferences — but converting back and forth between pixels (which designers often specify) and rem (which developers often implement) requires simple but frequent division and multiplication. This converter handles it instantly.

This tool is useful for front-end developers translating pixel values from a design file (like Figma) into rem-based CSS, designers wanting to understand how their pixel specifications translate to relative units, and anyone auditing an existing stylesheet's unit consistency.

To use it, enter a pixel value to see its rem equivalent, or enter a rem value to see its pixel equivalent — both update live and instantly as you type. You can also adjust the base root font size (defaulting to the standard 16px) if your project uses a different base, which is an important customization since not every project keeps the browser default.

For example, with the standard 16px base font size, a design specification calling for 24px of spacing converts to exactly 1.5rem, while a heading specified at 32px converts to 2rem — clean, simple values that are typical because most design systems intentionally choose pixel values that convert to tidy rem numbers for easier mental math during development.

A common mistake is assuming rem is always based on a fixed, universal 16px, when the actual base is whatever font size is set on the html (root) element in that specific project's CSS — if a project has changed the root font size (a common technique for simplifying rem math, like setting it to 62.5% of the browser default so 1rem conveniently equals 10px), all rem conversions in that project must use that project's actual configured base value, not the generic default. Always confirm your specific project's root font-size setting before doing rem conversions rather than assuming the standard 16px applies universally.

Tip: using rem (rather than px) for font sizes specifically respects a user's browser-level font size preference, which is an important accessibility consideration for users who've deliberately increased their default browser font size for readability — px values ignore this preference entirely, while rem values scale proportionally with it.

Frequently Asked Questions

Q.What is the default root font size rem is based on?

Browsers default to 16px, but any project's actual root font-size (set on the html element) can differ, and all rem conversions should use that specific project's actual configured value.

Q.Why use rem instead of px for font sizes?

Rem values scale proportionally with a user's browser font size preference, which is an important accessibility consideration that px values ignore entirely.

Q.Why do some projects set the root font size to 62.5%?

It makes 1rem conveniently equal to 10px (since 62.5% of the default 16px is 10px), simplifying mental math when converting between px and rem.

Q.Does this tool let me set a custom base font size?

Yes, you can adjust the base root font size used for all conversions to match your specific project's actual configuration.

Q.Is my data sent to a server?

No, all conversions happen instantly and locally in your browser.

Related Tools