Convert pixels to REM and REM to pixels for responsive CSS. Set any base font size and instantly see conversions. Includes a reference table of common px-to-rem values.
Enter a pixel value in the left field to convert it to REM, or enter a REM value in the right field to convert it to pixels.
Set the base font size (usually 16px, which is the browser default). If your root font size is different, update this field.
The conversion appears instantly in the output box. A quick reference table for common sizes is also shown.
REM (Root EM) is a CSS unit that is relative to the font size of the root element (html). By default, most browsers set the root font size to 16px, which means 1rem = 16px. Using REM units instead of pixels makes your design responsive to user font size preferences and simplifies scaling the entire interface by changing a single value.
To convert px to rem: rem = px ÷ base font size
To convert rem to px: px = rem × base font size
Example: 24px ÷ 16 = 1.5rem