Skip to content

CSS Unit Converter

Convert between px, rem, em, pt, % and viewport units.

5.0 (1 rating)

Conversions — click a value to copy

Processing and privacy

Processing varies by tool. Check the instructions for local processing, server requests, external services and any file or request limits before entering sensitive information.

Read the privacy policy

Share this tool

Found it useful? Send it to a friend or teammate.

Rate this tool

5.0

1 rating

  • 5 stars 1
  • 4 stars 0
  • 3 stars 0
  • 2 stars 0
  • 1 star 0

Click a star to rate this tool

Clear instructions

Find steps, examples and limitations below.

Use online

Open the tool in a supported web browser.

Free to use

No sign-up required. Tool-specific limits may apply.

How to use the CSS Unit Converter

Convert CSS lengths using explicit font and viewport reference sizes.

  1. 1 Enter Value and choose its Unit.
  2. 2 Set Root font size, Parent font or size, Viewport width and Viewport height to match your page.
  3. 3 Click a converted value to copy it.

Example and practical tips

With a 16px root font size, 32px corresponds to 2rem.

Frequently asked questions

Are em and rem always the same?

No. rem refers to the root font size; em depends on the applicable font-size context. Enter the correct reference values.

Are percentage conversions universal?

No. CSS percentages depend on the property and containing block. This tool uses the supplied parent reference, so verify it matches your use case.

  • How to Use CSS Unit Converter

    Convert CSS units: px to rem, em, pt, vw, vh and percent, using your own root font size and viewport. Free online CSS unit converter, copy the value.

Browse all guides

Report an issue

Something broken or not quite right? Tell us and we will look into it.

Accessibility Menu

Personalize your experience. Open with Ctrl+U (Option+U on Mac). Preferences stay in this browser when storage is available.

Move / Hide Widget

Restore at any time with Ctrl+U (Option+U on Mac).

Accessibility statement and help