← Web & Developer Utilities
Web & Developer Utilities

PX to REM / EM Converter

Convert CSS pixels into rem and em units with configurable font sizes. Copy the result straight into your stylesheet.

Conversion settings

Enter a pixel value and set the font sizes used for conversion.

Used to calculate rem. The common browser default is 16px.

Used to calculate em for the relevant parent context.

Pixels to REM

1.5rem

Pixel value divided by root font size.

Pixels to EM

1.5em

Pixel value divided by parent font size.

Reverse conversion

24px

The original pixel value, shown for reference.

Common pixel conversions

This table updates using your selected root and parent font sizes.

PixelsREMEMAction

When should you use rem or em?

REM is relative to the root element's font size, normally the document's html font size. It is useful for consistent spacing and typography across a site.

EM is relative to the applicable font size of the element's parent context. Nested elements can therefore inherit different effective sizes.

Remember: this tool performs mathematical conversions. The actual rendered size can depend on your CSS inheritance, browser settings, and styles.