Converters
REM to PX Converter
Easily convert REM units to PX for accurate layout scaling in CSS.
Default browser root font size is 16px
REM | PX (16px base) | Common Use |
---|---|---|
0.75rem | 12px | Small text |
0.875rem | 14px | Secondary text |
1rem | 16px | Body text |
1.25rem | 20px | Subheadings |
1.5rem | 24px | H3 headings |
2rem | 32px | H2 headings |
3rem | 48px | H1 headings |
What is REM?
REM (Root EM) is a unit of measurement in CSS that represents the font size of the root element (typically the <html> element). By default, most browsers set the root font size to 16px, making 1rem equal to 16px unless otherwise specified.
How REM to PX Conversion Works
The formula to convert REM to PX is straightforward:
PX = REM × Root Font Size
For example, with the default root font size of 16px:
- 1rem = 16px
- 1.5rem = 24px
- 2rem = 32px
- 0.75rem = 12px
Why Use REM Units?
REM units are particularly useful for creating responsive designs because they scale relative to the root font size. This means you can adjust the entire layout of your website by simply changing the root font size, making it easier to implement responsive designs and accessibility features like text resizing.
When to Use REM vs PX
Use REM for:
- Font sizes
- Margins and padding
- Widths that should scale with text size
- Responsive layouts
Use PX for:
- Border widths
- Shadows
- Elements that should maintain exact dimensions regardless of font size
Browser Support
REM units are supported in all modern browsers, including Chrome, Firefox, Safari, Edge, and Opera.