PX to REM Converter
Convert pixels to rem units, or rem to pixels, using your own base font size. Handy for responsive CSS.
Result
In short
What is the PX to REM Converter?
The PX to REM converter changes pixel values into rem units and back, using the base font size you set, which is 16 pixels in most browsers by default. Rem units scale with the root font size, so layouts respond better to user settings. It saves doing the division by hand.
How to use it
- Enter the value you want to convert.
- Enter the base font size, usually 16.
- Choose pixels to rem or rem to pixels.
- Copy the result into your CSS.
Questions
PX to REM Converter — FAQ
What is a rem?
A rem is a length unit equal to the font size of the root element of the page. If the root is 16 pixels, then 1 rem is 16 pixels.
Why use rem instead of pixels?
Rem sizes scale when a user changes their browser font size, which supports accessibility and flexible layouts.
Is my base always 16?
Browsers default to 16 pixels, but a stylesheet can change the root size. Enter the value your project uses.
More Developer & Web tools
URL Encoder & DecoderHTML Entity Encoder & DecoderUUID GeneratorPassword GeneratorRandom Number GeneratorHEX to RGB Colour ConverterColour Contrast CheckerUnix Timestamp Converter
Go further