UTILITY

CSS Unit Converter – PX, REM, EM, VW & VH

Convert CSS px to rem, em, pt, %, vw, vh and more online. Enter the font sizes and viewport dimensions for accurate relative unit conversion.

Tool
Loading tool…

What does this online tool do?

Convert CSS px to rem, em, pt, %, vw, vh and more online. Enter the font sizes and viewport dimensions for accurate relative unit conversion.

Instructions

  1. 1

    Enter a numerical CSS value and the unit you are converting from.

  2. 2

    Select the target unit and adjust root font, element font, percentage reference, and viewport dimensions.

  3. 3

    Convert and copy the result for your stylesheet.

Privacy and processing

This tool processes entered text locally in your browser without uploading it to a freedropper conversion server.

Frequently asked questions

How do I convert 16px to rem?

With a root font size of 16px, 16px equals 1rem. If your root font size changes, the result changes too.

What does em depend on?

An em is relative to the applicable font size. Enter the actual relevant element font size instead of assuming it is always 16px.

Can CSS percentages always be converted to pixels?

Only if the relevant reference length for the property is known. Supply the 100% reference in pixels; CSS percentages can use different reference sizes depending on the property.