TopDev
📐

CSS Unit Converter — px ↔ rem ↔ em

Convert between px / rem / em / pt / % / vw / vh in CSS. Adjustable base font-size and viewport. Perfect for design systems and responsive layouts.

All tools Browser-only
Default 16px (browser default). Change if your page uses a custom html/body font-size.
+ Advanced
For em — parent element font-size (default = base)
Common values:

Equivalent values

CSS Unit Converter — switch between px / rem / em / pt / % / vw / vh. Useful for design systems and responsive layouts.

rem is relative to the <html> root font-size. em is relative to the parent element. Default browser is 16px.

When to use which CSS unit?

Rules of thumb

Tips

Who this is for

Frontend devs, UI/UX designers, anyone prototyping visuals fast or generating CSS for Tailwind/React/Vue projects.

FAQ

Does the generated CSS work with Tailwind?

Yes. Output is vanilla CSS, paste into any .css file. For Tailwind projects, use @utilities layer or theme overrides.

Browser compatibility?

Modern CSS syntax (custom properties, grid). Works on Chrome/Firefox/Safari 2020+. IE11 NOT supported.

Related tools

See all tools →