When you are using a CSS preprocessor, the unit of measurement that is used to create font sizes is em. An em is defined as the point size of the currently selected font. It’s a relative measurement, so it will change based on your current font selection.
px is a unit of measurement for web design. Web designers love to use ems because it can be scaled without any loss of quality, and it’s the most flexible unit of measurement for web design.
This tool can convert from pixel to em or vice versa.
- Type in a base pixel.
- To convert from pixel to em, type in number in Source (px) then press Convert.
- To convert from em to pixel, type in number in Source (em) then press Convert.
Quick conversion with base as 16px
pixel | em | percent |
---|---|---|
8px | 0.500em | 50.0% |
9px | 0.563em | 56.3% |
10px | 0.625em | 62.5% |
11px | 0.688em | 68.8% |
12px | 0.750em | 75.0% |
13px | 0.813em | 81.3% |
14px | 0.875em | 87.5% |
15px | 0.938em | 93.8% |
16px | 1.000em | 100.0% |
17px | 1.063em | 106.3% |
18px | 1.125em | 112.5% |
19px | 1.188em | 118.8% |
20px | 1.250em | 125.0% |
21px | 1.313em | 131.3% |
22px | 1.375em | 137.5% |
23px | 1.438em | 143.8% |
24px | 1.500em | 150.0% |