Modern CSS style guides insist on rem units for font sizes and spacing because they scale with the reader’s settings, but designers still think and deliver in pixels. Converting by hand means dividing by the base font size dozens of times a day, and every stylesheet review turns into mental arithmetic. This converter does the whole family of conversions at once: give it a pixel value and your base size, and it returns rem, em, percentage and point equivalents, plus a reference table of the common sizes at your base so you can grab values without recalculating.
Quick Answer: Enter a pixel value and your root font size (16px is the browser default), and the converter instantly shows the rem, em, percentage and pt equivalents, with a reference table for common sizes below.
How to Use the PX to REM Converter
- Set the base (root) font size your project uses; leave it at 16 if you have not changed the html font size.
- Type the pixel value you want to convert.
- Read the equivalents: rem for global sizing, em for component-relative sizing, plus percent and points.
- Copy the value you need into your stylesheet.
- Use the reference table when converting a whole design scale at once.
Key Features
- Four units from one input: rem, em, percent of base, and points for print comparisons.
- Adjustable base size for projects that set a 10px or other root font size.
- Reference table covering the sizes designers use daily, recalculated instantly when the base changes.
- Reverse lookup in the same table: find the pixel row closest to a rem value you have inherited.
- Instant, local and unlimited: convert a whole design system’s worth of values in one sitting.
Best Practices and Tips
- Use rem for font sizes and layout spacing so user font preferences scale your whole design proportionally.
- Reserve em for padding and margins inside components, where sizing relative to the component’s own font size is the point.
- Round sensibly: 0.9375rem is exact for 15px, but most teams round to two or three decimals for readability.
- Document your base size at the top of the stylesheet; every conversion in the project depends on that one number.
Common Mistakes to Avoid
- Mixing bases between files: a rem value converted at base 10 pasted into a base-16 project is wrong by 60 percent.
- Assuming em and rem are interchangeable: em compounds inside nested elements, rem never does.
- Converting borders and hairlines to rem: 1px borders are conventionally left in pixels so they stay crisp.
- Forgetting the browser default is 16px only when the user has not changed it, which is exactly the accessibility reason to use rem.
Frequently Asked Questions
Why is 16px the default base?
Browsers ship with a default root font size of 16 pixels, and rem is defined relative to that root. Users can change it in their browser settings for accessibility, which is precisely why rem-based layouts respect their needs better than fixed pixels.
What is the difference between rem and em?
A rem is always relative to the root (html) font size. An em is relative to the font size of the element’s parent, so nested elements with em sizing compound: two levels of 1.2em produce 1.44 times the root size, not 1.2.
My project uses a 10px root. Why?
Some teams set the html font size to 62.5 percent (10px) so conversions become trivial: 14px is 1.4rem. It works, but it can fight user preferences if done carelessly. Set the base here to 10 and the converter matches that system.
Should media queries use px or em?
Media query ems are based on the initial font size and are not affected by your page’s root styling, which makes them predictable across zoom levels. Many frameworks therefore express breakpoints in em even when the layout uses rem.
Can I convert rem back to px here?
Yes, use the reference table in reverse: find your rem value in the rem column at your base size and read the matching pixels. The table covers the common range in both directions.
Related Tools