Design & UI
PX to REM Converter
Convert px and rem with a custom root size
About the PX to REM Converter
Free px to rem converter for CSS spacing and type. Set your root size, convert either way, and keep fluid layouts consistent across breakpoints.
How to use the PX to REM Converter
- Set the root font size your site uses, usually 16px.
- Enter a pixel value to get rem, or rem to get pixels.
- Copy the result into your stylesheet or design tokens.
What to check
If html { font-size } is not 16px, change the root field so rem math matches production.
Why prefer rem over px?
Rem scales with the root font size, which helps accessibility when users enlarge text.
Does this convert em as well?
This tool targets rem against the root. Em depends on the parent font size, so it needs context you set in CSS.