CSS Units Converter
Choose a CSS unit, enter a value and context, and copy the local conversion results.
Enter valid values.
A QUICK WALKTHROUGH
How to use this tool
- Choose the input unit and enter a finite value from -1,000,000 to 1,000,000.
- Set root and parent font sizes when rem or em is involved.
- Review the conventional results and copy them.
Context-aware em
em depends on the parent element context. This tool uses the entered parent font-size as an approximation, not a browser layout calculation.
Conventional conversion
px, rem, em, and percentage use the entered reference sizes. Results are rounded to six decimal places.
Local validation
Values and font sizes must be finite and within 0 to 10,000px for sizes. A zero reference size is rejected to prevent division by zero.
GOOD TO KNOW
Common questions
Is em exact?
No. em is context-dependent; the entered parent font-size provides an explicit approximation.
Can I enter negative values?
Yes, finite values from -1,000,000 to 1,000,000 are accepted.