PX to REM Converter
Convert between px, rem, em, pt, vw, vh, percent, cm and inches with your own root font size, parent font size and viewport dimensions.
Free · No sign-up · Your inputs stay in your browser
Input
Convert px, rem, em, pt and viewport units
Output
24px
px
24px
rem
1.5rem
em
1.5em
pt
18pt
vw
1.6667vw
vh
2.6667vh
% of parent font
150%
cm
0.635cm
in
0.25in
CSS fixes 1in = 96px = 72pt, so pt and cm are exact here; on screen they are not physical lengths. Prefer rem for type and spacing: it scales with the reader's browser font size setting, which px ignores. em compounds through nesting, which is why rem replaced it for most uses.
Runs in this browser. Nothing you paste is sent to a server.
About this tool
Method, assumptions, practical next steps, and limits.
Why rem for type and spacing
Readers who raise their browser's default font size, often for accessibility, get larger text only where sizes are in rem or em; px ignores the setting. rem is relative to the root element only, so it does not compound through nesting the way em does. The units are defined in CSS Values and Units Level 4.
Physical units are not physical
CSS anchors 1in to 96 pixels, so cm and pt are exact relative to px but do not measure anything on a screen. They are useful for print stylesheets and nothing else.