Converters

CSS Unit Converter

Convert between CSS units: px, em, rem, vw, vh, and percentage. With adjustable base font size.

View all Converters
px
px
-
rem
-
em
-
vw
-
vh
-
%
-

Continue Workflow

Related tools to try next

All tools
Browser Local No sign-up

Example

Convert pixels to rem

A 16px browser base is common, but your project may use a different root font size.

Input


                        16px with a 16px base font size
                      

Output


                        1rem
1em
100%
                      

Practical Notes

How to Use

  1. 1. Enter the value you want to convert.
  2. 2. Choose the source CSS unit.
  3. 3. Set the base font size used for rem, em, and percentage calculations.
  4. 4. Review the converted px, rem, em, vw, vh, and percentage values.

Features

Use Cases

Frequently Asked Questions

What is the difference between rem and em?
rem is relative to the root font size. em is relative to the current element or inherited font size.
Why does base font size matter?
rem, em, and percentage conversions depend on a reference size. Changing the base changes the converted result.
Are vw and vh exact for every screen?
vw and vh are viewport-based units. This tool uses reference viewport dimensions, so always test final values in your real layout.
Is this conversion done on a server?
No. CSS unit conversion runs locally in your browser.