Pixedra Logo

PX to REM Converter (CSS Unit Calculator)

Stop using your calculator to divide by 16. Pixedra’s PX to REM Converter makes modern CSS development faster. Simply enter your desired pixel value, and we calculate the exact REM (Root Em) value instantly. Whether you are building a responsive layout or ensuring Accessibility (a11y) compliance, moving from hard-coded Pixels to relative REM units is the industry standard for modern web design.

How to Calculate REM from Pixels

The formula to convert PX to REM is simple:

REM = Target Pixel Size / Base Root Size

By default, most web browsers (Chrome, Firefox, Edge) set the root font size (<html>) to 16px.

  • Example: If you want a 24px header: 24 / 16 = 1.5rem.
  • Example: If you want a 32px padding: 32 / 16 = 2rem.

PX to REM Conversion Table (Base 16px)

Pixels (px)REMUsage (Approx)
12px0.75 remSmall Text / Captions
14px0.875 remSecondary Text
16px1 remStandard Body Text
18px1.125 remLarge Body Text
20px1.25 remSub-headers (H5)
24px1.5 remMedium Headers (H4)
32px2 remLarge Headers (H3)
48px3 remHero Titles (H1)
64px4 remDisplay Text

Note: Calculations assume the browser default root font size of 16px.

Frequently Asked Questions

Dev Tip

Working with icons? Use our SVG to React Converter to optimize your assets.

Need to handle API data? Generate types instantly with our JSON to TypeScript Converter.