PX to REM Converter
Convert pixels to rem and em for CSS, and rem back to pixels, using your base font size.
- 24px in rem and em
- 1.5rem
- 1.5rem in pixels
- 24px
What is PX to REM Converter?
A rem is a CSS unit that is relative to the root font size of the page. Using rem makes text and spacing scale when people change their browser font size.
What this tool does
Divides pixels by the base font size to get rem, and multiplies rem by the base size to get pixels. The default base is 16 pixels, which is the browser default.
How to use it
- Check the base font size.
- Enter pixels, rem, or both.
- Copy the converted value into your CSS.
Did you know?
- Most browsers use 16 pixels as the default font size, so 1rem is 16px unless the page changes it.
- Rem units help accessibility because they respect the font size users choose in their browser.