CSS Unit Converter
Convert px to rem, em, vw, pt, and other CSS units with a configurable base font size.
Settings (root size, viewport, base size)
Related Tools
0 comments
How it works
Enter a value in any CSS unit. The tool converts to all other major units simultaneously using a configurable root font size (default 16px) and viewport width/height. Rem and em conversions use the root font size; vw/vh conversions use the viewport dimensions; pt uses the print conversion 1pt = 1.333px. All computation runs in your browser with no external requests.
Common use cases
- Converting a design spec in pixels to rem for accessible, scalable CSS.
- Checking what vw value matches a given pixel width at a specific viewport size.
- Quickly switching between px and pt when preparing styles for print.
Frequently asked questions
What is the default root font size?
The tool defaults to 16px, which is the browser default. Change it in the settings if your root font-size is different.
Is em the same as rem?
No. rem is relative to the root (html) element font size; em is relative to the parent element font size. For most layout work, rem is more predictable.
Does this support ch or ex units?
Not currently — ch and ex depend on the specific font in use, which the tool cannot know. The tool covers the most common layout units: px, rem, em, vw, vh, pt, cm, and mm.