All tools · 🎨 Design

📏 px ↔ rem ↔ em

CSS has too many length units. This tool converts between px, rem, em, %, pt, and viewport units (vw, vh) with a configurable root font size (default 16px). Helpful when migrating an old pixel-based design to a responsive rem-based one.

Loading tool…

Examples

16 px in different units
Output1 rem · 16 px · 12 pt · 100% (of 16px parent)
24 px on a 1920×1080 viewport
Output1.5 rem · 1.25 vw · 2.22 vh

Frequently asked questions

rem vs em — what is the difference?

rem is relative to the root html font-size. em is relative to the parent element's font-size — so em values compound when nested.

Should I use px or rem?

rem for typography and spacing — it scales with the user's browser settings (accessibility). px for borders and exact pixel-precision things.

When are vw/vh useful?

Full-viewport elements (heroes, splash screens), and "fluid typography" patterns like font-size: clamp(1rem, 2vw, 1.5rem).

About this tool

px ↔ rem ↔ em runs entirely in your browser using standard Web APIs. No data is sent to any server. The source for this tool is in our public GitHub repository.

Related tools

← All 96 tools

Why this tool

vs typical free web-tool sites

1vwTypical free site
PriceFreeFree
Signup requiredNoOften (for premium features)
Ads inside the toolNoYes (banner + video)
Data sent to serverNo (browser-only)Yes (inputs analyzed for ads)
Total tools96Often <20 or scattered across sites
Bookmarkable URL per toolYesMixed
Loads in under 1sYes (static)Often slow (ad tracking)
MultilingualEN / ES / PT / FR / DEUsually EN only
Open sourceYesNo