📐

PX to REM, EM & CSS Unit Converter

Convert CSS lengths accurately in either direction using custom root, parent, percentage reference and viewport dimensions.

Bidirectional conversion7 CSS unitsBulk PX conversionCustom precision

CSS unit workspace

Edit any unit field and every equivalent updates instantly.

Runs locally
Equivalent CSS values
Common CSS size reference
UsePXREMEMPTVW

Choose CSS units with confidence

Relative units help interfaces respond to user preferences and component context. This converter separates the references used by REM, EM, percentages and viewport units so the results reflect how CSS actually calculates them.

REM uses the root

1rem equals the computed font size of the document root element.

EM uses context

For most properties, 1em equals the current element’s computed font size.

Viewport units scale

1vw and 1vh equal one percent of viewport width and height.

How to use this converter

  1. Set the root and parent font sizes used by your design.
  2. Enter a value in any unit field to convert from that unit.
  3. Adjust viewport dimensions when calculating VW or VH.
  4. Copy an individual value or convert a list of pixel tokens in bulk.

Frequently Asked Questions

Why is 16px usually equal to 1rem?

Most browsers start with a 16px default root font size. The actual result changes if the page or user settings change that root size.

Are REM units always more accessible than pixels?

REM often scales better with user font settings, but accessibility also depends on layout flexibility, zoom support and avoiding clipped text.

What is the difference between REM and EM?

REM always references the root font size. EM is contextual and generally references the current element’s font size, so nested EM-based sizing can compound.

How is PT converted to pixels?

CSS assumes 96 pixels per inch and 72 points per inch, so 1pt equals 1.3333 CSS pixels and 1px equals 0.75pt.