PX to REM Converter
Convert pixels to rem — and back — instantly. Set your root font size (16px by default) and get accessible, scalable units for your CSS.
About this tool
rem units scale with the user's root font size, so layouts respect browser and accessibility settings that fixed px values ignore. The formula is simple — rem = px ÷ base — but doing it in your head across a whole stylesheet is tedious. This does it live as you type.
How to use it
- 1Enter a pixel value (or a rem value on the right).
- 2Adjust the base font size if your root isn't the default 16px.
- 3Copy the converted value straight into your CSS.
FAQs
What is the px to rem formula?
rem = px ÷ base font size. With the default 16px base, 24px = 24 ÷ 16 = 1.5rem.
Should I use rem or px in CSS?
Prefer rem for font sizes and spacing so your UI scales with user and accessibility settings. px is fine for hairline borders and fixed details.
Need a custom tool for your team?
We build internal tools and utilities tailored to how you work. Drop your email for a free scoping call.