12px → REM
12px to REM — 0.75rem at 16px Base
At the default browser root size of 16px, 12px equals
0.75rem. Formula: rem = px ÷ 16.
Last reviewed:
CSS snippet
.example {
font-size: 0.75rem; /* 12px at 16px root */
padding: 0.75rem;
} PX to REM formula
rem = px ÷ root font size
12px ÷ 16px = 0.75rem Worked example: To convert 12px at a 16px root, divide 12 by 16.
12 ÷ 16 = 0.75. Write font-size: 0.75rem;
instead of font-size: 12px; so
text scales when users enlarge their browser default font size.
Common use cases at 12px (0.75rem)
| Category | Tailwind / design use | CSS property example |
|---|---|---|
| Font size | text-xs (0.75rem) | font-size: 0.75rem; |
| Spacing | — | padding: 0.75rem; |
| Gap / margin | — | gap: 0.75rem; |
Nearby pixel conversions
Also see 10px to rem
and 14px to rem
.
12px to REM FAQ
How do you convert 12px to rem?
Divide 12 by the root font size. At the default 16px base: 12 ÷ 16 = 0.75rem. Formula: rem = px ÷ root font size.
What is 12px in rem at 16px base?
At a 16px root font size, 12px equals exactly 0.75rem. This is the browser default unless your project or the user changes html { font-size }.
Should I use 0.75rem or 12px in CSS?
Use 0.75rem for typography and spacing that should scale with the user's root font-size preference — important for accessibility. Reserve 12px for fixed values like 1px borders or bitmap image dimensions.
How do I convert 0.75rem back to pixels?
Multiply 0.75rem by 16: 0.75 × 16 = 12px. Reverse formula: px = rem × root font size.
Where is 12px commonly used in web design?
12px (0.75rem) maps to text-xs (0.75rem) in typical design systems. For Tailwind spacing, see —. Check the use-case table on this page for CSS property examples.
Full converter
PX to REM Converter — any value, custom base
Cheat sheet
PX to REM cheat sheet — 12px through 64px