CSS Unit Converter (px, rem, em, pt, %)
Convert between px, rem, em, pt and percent for font sizes and spacing. Free CSS unit converter with adjustable base size.
rem is relative to the root element, em to the parent, and % to the parent font size.
Frequently asked questions
- What is the difference between rem and em?
- rem is relative to the root html font size; em is relative to the parent element, so em values compound when nested.
- What is the default root font size?
- 16 px in all browsers by default, which is why 1 rem equals 16 px unless you change it.
- How do I convert pt to px?
- 1 pt equals 96/72 px, so 12 pt is 16 px. Points are used in print, pixels on screens.
- Why use rem for spacing?
- Rem respects the user browser font-size setting, which makes layouts more accessible for people who increase text size.
This tool runs entirely in your browser. No data is uploaded anywhere.