← All tools

PX, REM and EM Converter

Convert CSS lengths using separate root and EM contexts, or rewrite parsed CSS dimensions while preserving comments, strings and URLs.

pixel-to-em-rem-converterLOCAL WORKSPACE

Enabling local controls…

Tool settings

PT = PX × 72 ÷ 96; % = PX ÷ percentage basis × 100. The percentage context is separate from font sizes; batch percentages share one supplied basis, so check each CSS property. REM = PX ÷ root size; EM = PX ÷ EM context. Rounded to 6 decimal places. Batch rewrites parsed dimension tokens, preserving comments, strings and URLs; pasted CSS is never previewed or executed.

Editing clears the previous result; generate again.

EM normally refers to the element font size; in font-size itself it uses the parent font size. One supplied context cannot model every element in a stylesheet. Batch conversion is syntactic and includes matching media-query dimensions; it never runs pasted CSS.

Processed in local memory; inputs are not transmitted or stored.

Static source date: 2026-10-18

Preview and complete output

Set the controls, then generate.

How to use this tool

Choose the source unit, enter a value and font contexts, then convert. For batch CSS choose the target unit and convert a complete stylesheet.

When not to use it

EM normally refers to the element font size; in font-size itself it uses the parent font size. One supplied context cannot model every element in a stylesheet. Batch conversion is syntactic and includes matching media-query dimensions; it never runs pasted CSS.