PB
Available
swap_horiz
lock Free · Private · In-Browser

CSS Unit Converter

Convert common CSS units using your base font size, parent size, and viewport dimensions.

Translate CSS units with context

CSS units are only simple when the context is obvious. rem depends on root size, em depends on parent font size, and viewport units depend on screen dimensions.

This converter puts the needed assumptions in one place so you can move between units deliberately.

Frequently Asked Questions

Which units are supported?

px, rem, em, vw, vh, and percent are included.

Why do I need viewport settings?

vw and vh depend on viewport width and height, so the converter needs those values.

Why do percent values need a parent size?

Percent lengths are relative to a parent or context size, not an absolute global value.

Take it further
Web Design Services

Need a polished interface, not just generated CSS snippets? Let us build it.

Learn More arrow_forward