Online Tool Store Online Tool Store

CSS Units Converter

Convert between px, rem, em, vw, vh, and pt with adjustable root font size and viewport dimensions, instantly in your browser.

🔒 This tool runs entirely in your browser. Your files are never uploaded to a server.

Example shown — replace it with your own value and settings.

px

rem

em

vw

vh

pt

em is treated the same as rem here (relative to the root size) — a true em also depends on a parent element's font size, which this tool can't know.

How the CSS units converter works

  1. Enter a value and its unit — px, rem, em, vw, vh, or pt.
  2. Set the root font size and viewport dimensions to match your actual project if they differ from the defaults.
  3. Every unit updates instantly, converted through pixels as the common reference point.

The method

Pixels are used as the common base unit, since every other CSS length unit here has a well-defined pixel equivalent: rem/em multiply by the root font size, vw/vh are percentages of the viewport dimensions, and pt uses the fixed 96px = 72pt ratio that print and screen units share.

FAQ

Why does changing the root font size affect rem values?

rem stands for "root em" — it's always relative to the root (html) element's font size, which defaults to 16px in every major browser but can be changed by a site's own CSS or a user's accessibility settings.

Why is em treated the same as rem here?

A true em is relative to its parent element's font size, which can vary anywhere in a page's CSS and isn't something this standalone tool has access to. Treating it the same as rem (relative to the root) gives a reasonable estimate for the common case where nesting doesn't change the effective font size.

Why do I need to enter a viewport size for vw/vh?

vw and vh are percentages of the browser window's width and height respectively — there's no fixed conversion to pixels without knowing the actual viewport size, so this tool asks for one to calculate against.

Is my input sent anywhere?

No. Every conversion happens instantly in your browser as you type — nothing is sent to Online Tool Store or any other server.

How we compare

Feature Online Tool Store PX to REM converter sites Manual calculation
Shows px, rem, em, vw, vh, and pt at once Usually px/rem only
Adjustable root font size and viewport Often fixed at 16px
Instant, no ads Ad-supported Slow

For a quick, all-in-one CSS unit conversion with adjustable root size and viewport, the Online Tool Store CSS Units Converter shows every unit at once.

Explore related tools

Embed this tool

Paste this on your own site — it stays free, and every file still stays in your visitor's browser, not yours or ours.