px to rem & em Converter
Convert between px, rem and em using your own root and context font sizes — edit any field and the other two update as you type.
| px | rem |
|---|---|
| 8 | 0.5 |
| 12 | 0.75 |
| 14 | 0.875 |
| 16 | 1 |
| 18 | 1.125 |
| 20 | 1.25 |
| 24 | 1.5 |
| 32 | 2 |
| 40 | 2.5 |
| 48 | 3 |
Every conversion runs in your browser. Nothing you type is uploaded to BroBroGo.
FAQ
What is the difference between px, rem and em?
px is a fixed length. rem is measured against the page’s root font size, so at a 16px root, 1rem equals 16px. em is measured against the font size of the element it sits in. Sizing type and spacing in rem lets everything scale when a reader changes their default font size.
Why is there a separate em context size?
em is relative to the font size of its own element, which is not always the root. Set the em context to that element’s font size to read the em correctly, and keep it equal to the root when the two match.
What if my root font size is not 16px?
Change the root font size field to match your CSS and every rem value updates instantly. The quick table below is a handy guide for the common 16px root that most sites start from.