CSS Unit Converter
Convert between px, em, rem, pt, %, and vw. Set your base font size and viewport width for accurate results.
Quick Reference
1em / 1rem = base font size (16px by default)
1pt = 1/72 inch = 1.333px
100% = 1em = base font size
1vw = 1% of viewport width (19.2px)
em is relative to parent, rem is relative to root
pt is commonly used in print CSS
How to Convert CSS Units Online
- 1. Set your base font size (default 16px, matching most browsers) and viewport width (for vw calculations).
- 2. Enter a numeric value and select the input unit (px, em, rem, pt, %, vw).
- 3. All equivalent values are calculated and displayed instantly.
- 4. Click Copy next to any result to copy it to your clipboard.
Frequently Asked Questions
What is the difference between em and rem?
Both are relative units. em is relative to the font size of the parent element, while rem is always relative to the root (html) element font size. rem is generally preferred for consistent sizing across components.
Why is the default base font size 16px?
All major browsers use 16px as the default root font size. Unless you override it in your CSS (e.g., html { font-size: 62.5%; }), 1rem = 16px.
When should I use vw units?
vw (viewport width) units are useful for responsive typography and layouts that scale with the browser window. 1vw equals 1% of the viewport width. Use with caution as very small viewports can make text unreadable.
Is my data sent to a server?
No. All calculations run entirely in your browser using JavaScript. No data is transmitted or stored.