PX to REM converter
Convert pixels to REM and EM units in real time, with an adjustable base font size, CSS output and reference table.
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 |
|---|---|---|---|---|
Popular uses
About this tool
Convert pixels to REM and EM units in real time. Switch between px and rem effortlessly, set your custom base font size (default 16px), preview typography live, and copy CSS code with one click.
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
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.