PX to REM & EM Converter
Convert between px, rem and em for any base font size and see all three equivalents instantly — runs 100% in your browser with no upload.
16px1rem1em
🔒 Converted in your browser — nothing is uploaded.
What this px to rem converter does
Enter a value in pixels or in rem, set your base (root) font size, and this tool shows the equivalent px, rem and em values instantly. The two inputs are linked both ways: type a pixel value to see its rem, or type a rem value to see its pixels. The base font size defaults to 16px, the browser default, but you can change it to match your own root styles. Copy any equivalent with a single click and paste it straight into your CSS.
How the conversion works
The math is simple and lossless: rem = px / base and px = rem × base. With the standard 16px base, 24px equals 1.5rem and 1rem equals 16px. Because em here is measured against the same base font size, its value matches the rem value — useful when your element inherits the root size. Results are rounded to five decimal places so long fractions stay readable without losing practical accuracy for layout work.
Frequently asked questions
What base font size should I use?
Most browsers use 16px as the default root font size, so 16 is the safe starting point and the tool's default. If your CSS sets a different root size (for example html { font-size: 62.5% } which makes 1rem = 10px), enter that pixel value as the base so the conversions match your project.
What is the difference between rem and em here?
rem is always relative to the root font size, while em is relative to the font size of the current element. This tool measures both against the base you enter, so the rem and em figures are equal — handy for elements that inherit the root size, but remember em can differ once a parent changes the font size.
Is anything I type uploaded to a server?
No. Every calculation runs locally in your browser with JavaScript. The values you enter and the results are never sent, stored or uploaded anywhere.