Developer tools

px, rem and em converter

Convert between px, rem and em from your base font size, with a table of common sizes.

Runs in your browser. Nothing you enter is uploaded.

Common sizes

pxremem
12
14
16
18
20
24
32
40
48
64

About this tool

This converter turns a value between px, rem and em as you type in any of the three fields. rem is calculated from the root font size and em from the parent font size, both 16 px by default, and a table lists common sizes from 12 to 64 px in both units.

What is the difference between rem and em?
rem is relative to the font size of the html element, while em is relative to the font size of the element’s parent. That is why the tool asks for both values separately.
How many decimals does the result have?
Results are rounded to at most 4 decimal places, and trailing zeros are dropped, so 14 px at a 16 px base shows as 0.875 rem.