Web Development / Development Tools

REM to PX Conversion Tool

Oct 19, 2022
2 min read
REM to PX Converter

REM to PX Calculator

This tool allows you to work you the PX size from REM sizes.

Base font size:
px
Size in REM:
em

Result: 0 px.

With a base font size of 16, the font size in pixels with an em of 0 is 0 px.

FAQs

What is the base font size?

The base font size is the font size of the html container.

What is an REM?

An REM (Root Emphemeral Unit) is a unit of measurement relative to the font size of its the root element, which is the <html> element. If the <html> element has no font-size set, the browser default of 16px is used.

For example:

  • If the base font size is 16 px and a font in the document is set to 1.5 EM, the font is 16 x 1.5, or 24 pixels.
  • If a parent element’s font is changed to 20px (assuming it not the root element), then a font of 1.5 rem will still be 16 x 1.5, or 24 pixels.

How do you convert between REM and PX

You can use the calculator above to calculate the pixel size of a font from an REM value. Alternatively, here is the formula for EM to PX:

Formula: Size in EM * base font size in pixels

Example: 2em * 16px = 32px