PX to REM Converter
Enter a pixel value to convert it to rem (or the other way around), based on your root font size — the calculation every front-end developer needs when working with scalable, accessible CSS units.
Design & CSS Tools Runs entirely in your browser
All calculations happen on your device — nothing is sent to a server.
px
16
rem
1
em
1
What this tool does
Converts between pixels and the relative units rem and em, based on the root font size and the parent element's font size.
When to use it
- A pixel-based design you are converting to relative units for responsiveness.
- Checking what a rem value is in pixels.
- Working with em inside an element with a custom font size.
- Standardising units across a stylesheet.
How to use it
- Enter the "Root font size" — 16 pixels by default in most browsers.
- Enter the "Parent element font size (for em)".
- Enter the value and read its equivalent.
A practical example
Input
24 pixels at a root font size of 16.
Output
1.5rem.
Limitations
- Font sizes must be greater than zero, and you get a message if they are not.
- The substantive difference between rem and em: rem is always computed from the document root while em is computed from the parent — so em compounds in nested elements and rem does not.
- A user may change their browser's default font size, which is precisely why relative units matter: pixel values do not respond to that preference.
Privacy and processing
The conversion runs on your device and nothing is sent to a server.
Technical notes
- The parent font-size field is separate because em needs it while rem is entirely unaffected by it.