Your data never leaves this tabRead the guide

Free CSS Unit Converter — px to rem, em & vw Online

Convert px, rem, em, %, vw, vh, pt, cm, mm, and inches — with live context-aware results.

Result

1rem

How it works

1

Enter value

Type the CSS value you want to convert.

2

Choose From unit

Select your source unit (px, rem, em, %, vw, etc.).

3

Choose To unit

Select the target CSS unit.

4

Adjust context

Set base font size or viewport dimensions for accurate rem/em/vw/vh results.

Common use cases

Responsive design

Convert fixed pixel values to fluid rem/em units for accessible, scalable layouts.

Print stylesheets

Convert screen units to physical units (cm, mm, pt, in) for print-ready CSS.

Viewport-relative sizing

Calculate exact vw/vh values from pixel dimensions for full-screen layouts.

Design handoff

Translate design tool pixel specs into the CSS units your codebase uses.

Frequently asked questions

What is the default base font size for rem conversions?

The default base font size is 16px, which is the browser default. You can change this in the context settings.

How are em units calculated?

em is relative to the parent element's font size. This tool uses the base font size as the reference — adjust it to match your actual parent element.

How does vw/vh conversion work?

vw and vh are percentages of viewport width and height. Enter your viewport dimensions to get accurate pixel equivalents.

Is this tool free?

Yes — completely free, no account, runs entirely in your browser.

What is 1rem in pixels?

With the default 16px base font size, 1rem = 16px. If you change the root font size to 18px, then 1rem = 18px.

Is my data sent to a server?

No — all conversions run locally in your browser. Nothing is uploaded.