CSS Unit Converter
Convert CSS lengths between px, rem and em using the font sizes from your design. Copy each equivalent value directly into a stylesheet.
Enter a number or paste a CSS length such as 1.5rem.
Input unit
Use the root element's computed font size for rem.
For font-size, use the parent's font size. For spacing such as padding or margin, use the element's own font size.
Equivalent lengths
- px
- 24px
- rem
- 1.5rem
- em
- 1.5em
Frequently asked questions
Related developer tools
Color Converter & Picker
Convert colors between HEX, RGB, HSL. Get Tailwind suggestions and pick colors from your screen.
Unit Converter
Comprehensive unit converter supporting 17 categories including length, mass, volume, temperature, speed, pressure, energy, and more. Convert between 188 different units with precision.