Unit Converter · Length & font-size

128px to em

128px = 8em

Assumes a root font-size of 16px (the browser default). Adjust it in the calculator below if your project uses a different base.

Quick converter

Type into any field — every unit in this category updates instantly.

Root font-size 16px

Common px → em values

Click any row to open its dedicated page.

pxem
4px 0.25em
6px 0.375em
8px 0.5em
10px 0.625em
12px 0.75em
14px 0.875em
16px 1em
18px 1.125em
20px 1.25em
24px 1.5em
28px 1.75em
32px 2em
36px 2.25em
40px 2.5em
44px 2.75em
48px 3em
56px 3.5em
64px 4em
72px 4.5em
80px 5em
96px 6em
112px 7em
128px 8em
144px 9em
160px 10em
192px 12em
224px 14em
256px 16em

Convert 128px to other units

Formula

rem = px ÷ root-font-size and px = rem × root-font-size. Browsers default the root font-size to 16px, so 1rem normally equals 16px unless the page (or the user's browser settings) changes it.

em works the same way, but relative to the parent element's font-size rather than the root — the numbers only match rem when nothing in the ancestor chain has resized the font.

pt is a print unit: 1pt = 1.333px, based on the fixed 96px-per-inch / 72pt-per-inch relationship browsers use.

Use it in code

Click to copy.