EM → PX Converter
Converting from EM to PX is common when switching from ideal when you need sizing relative to parent elements. to great for pixel-perfect layouts but not flexible for responsive design. in CSS projects.
Conversion Form
About the Unit
EM: EM is a relative unit that depends on the font size of the parent element in which the current element is inserted. That is, 1em will be equivalent to the font size of the parent element. If the font size of the parent element is 20px, 1em will be equal to 20px. This unit is particularly useful when you want to create dynamic layouts that adjust based on the context of the parent element. For example, using em instead of px ensures that the size of fonts, margins, or other layout elements will scale relative to the text size of the parent component, making the design more flexible and responsive. A key detail about em is that it can accumulate when used in chain (i.e., if a child element uses em to set its size and the parent element also uses em, the value will multiply), which can lead to unexpected results if not used carefully.
Pro Tip: em → px
Convert em to px when you need fixed sizes, especially for pixel-perfect designs.
Quick Reference: Unit Conversion by Tens
| EM | PX |
|---|---|
| 10em | 160px |
| 20em | 320px |
| 30em | 480px |
| 40em | 640px |
| 50em | 800px |
| 60em | 960px |
| 70em | 1120px |
| 80em | 1280px |
| 90em | 1440px |
| 100em | 1600px |
| 110em | 1760px |
| 120em | 1920px |
| 130em | 2080px |
| 140em | 2240px |
| 150em | 2400px |
| 160em | 2560px |
| 170em | 2720px |
| 180em | 2880px |
| 190em | 3040px |
| 200em | 3200px |
| 210em | 3360px |
| 220em | 3520px |
| 230em | 3680px |
| 240em | 3840px |
| 250em | 4000px |
Live Unit Preview
See how different CSS units affect the size of the box below:
10px
10rem
10em
10%
10vw
10vh
Common Mistake
Convert em to px when you need fixed sizes, especially for pixel-perfect designs.
Real Code Example
/* Mobile-first card with em → px */
.card {
padding: 0em; /* undefinedpx */
font-size: 1.5rem;
width: min(90vw, 40ch);
}Frequently Asked Questions About EM
When should I use em instead of em?
Use em when scaling relative to parent is needed.
How many em is 1em?
Depends on parent font size.
Is em affected by zoom?
Yes, it scales with parent and zoom.
Is em good for fonts?
Yes, especially for nested components.
Keyboard Shortcuts
- Ctrl + C: Convert
- Ctrl + I: Invert units
- Esc: Reset values