PX to REM converter
Convert pixels to REM online for free. Real-time PX to REM converter with custom base font size and live CSS snippet.
In your browser
Root <html> font size (browser default is 16px)
Live Typography Preview
Editable preview at the exact font size.
Common Font Size Reference Scale
Calculated using base font size of . Click any row to use it.
| Pixels | REM | EM | Tailwind Class | Action |
|---|---|---|---|---|
Also with the px to rem converter
About this tool
Convert pixel values to accessible CSS REM units in real time. Default base font size is 16px. Enter any pixel value to get the exact REM and copy the CSS.
How to use it
- 1 Enter your pixel (px) or REM value.
- 2 Adjust the base font size if your project root differs from 16px.
- 3 Copy the converted value or CSS snippet.
Questions
How many REM is 16px?
With the default base font size of 16px, 16px equals exactly 1rem.
Why should I use REM instead of PX in CSS?
REM units scale relative to the user’s browser root font size, making your website accessible to users who adjust default font sizing or zoom levels.
What is the standard base font size?
The default root font size in all modern web browsers is 16px (1rem = 16px).
What is the difference between REM and EM?
REM is relative to the root <html> element, while EM is relative to the font-size of its immediate parent container.
How do I calculate REM from PX?
Divide the pixel value by your base font size: px / base = rem (for example, 24px / 16px = 1.5rem).
Is my data uploaded?
No. This tool runs in your browser, so your text and files never reach our server.
Is this tool free?
Yes. It’s free to use with no sign-up and no limits for normal use.
More in Colour & design
- CSS gradient generator Design a linear or radial gradient and copy the CSS.
- Box shadow generator Tune a CSS box shadow visually and copy the code.
- Aspect ratio calculator New Calculate width, height and proportional aspect ratios with 16:9, 9:16 and custom presets.
- Color picker Pick any colour, from a palette, the screen, or an uploaded image, and get HEX, RGB and HSL.
- Color converter Convert a colour between HEX, RGB, HSL and CMYK.
- Color palette generator Build a harmonious colour palette from one base colour.