What is 12px in rem?
12px equals 0.75rem when the root font size is 16px. Divide pixels by the root font size to convert to rem. The calculation is 12 ÷ 16 = 0.75. If the root font size is 20px, the same 12px equals 0.6rem.
| Pixels | Rem |
|---|---|
| 8px | 0.5rem |
| 12px | 0.75rem |
| 14px | 0.875rem |
| 16px | 1rem |
| 18px | 1.125rem |
| 24px | 1.5rem |
| 32px | 2rem |
Convert CSS values using your root font size
Enter one value per line, with or without the unit suffix. Set Base to the computed font size of your document's root html element. Choose rem to px for the reverse conversion, which multiplies the rem value by the base size.
Rem units refer to the root font size. Em units usually refer to the element's own font size, with different rules for the font-size property. The CSS length reference explains these units. For proportional image dimensions, use the aspect ratio calculator.
Common questions
- How much is 12px in rem?
- 12px is 0.75rem at a root font size of 16px. Divide 12 by your actual root font size if it differs from 16px.
- Is 1rem always 16px?
- No. 1rem equals the computed font size of the root html element. Enter that size in Base to get the right conversion for your page.