PX to REM Converter: Instant Pixels to Rem Calculator

Convert px to rem and rem to px instantly with our free CSS converter. Customize the root font size, copy results, and simplify responsive web design.

Default browser font size is usually 16px
px
rem

16px ÷ 16px = 1rem

Based on 16px base font size

Quick Conversions

Common pixel values at 16px base

PixelsPixels -> REM
PixelsREM
4px0.25rem
8px0.5rem
10px0.625rem
12px0.75rem
14px0.875rem
16px1rem
18px1.125rem
20px1.25rem
24px1.5rem
28px1.75rem
32px2rem
36px2.25rem
40px2.5rem
48px3rem
56px3.5rem
64px4rem
72px4.5rem
80px5rem
96px6rem
REMREM -> Pixels
REMPixels
0.25rem4px
0.5rem8px
0.75rem12px
1rem16px
1.125rem18px
1.25rem20px
1.5rem24px
1.75rem28px
2rem32px
2.25rem36px
2.5rem40px
3rem48px
3.5rem56px
4rem64px
5rem80px
6rem96px

Common PX to REM conversions (16px base)

Pixels REM Typical use
12px 0.75rem Small text or compact spacing
14px 0.875rem Small text or compact spacing
16px 1rem Body text or controls
18px 1.125rem Body text or controls
20px 1.25rem Body text or controls
24px 1.5rem Headings or larger gaps
32px 2rem Headings or larger gaps
40px 2.5rem Display type or section spacing
48px 3rem Display type or section spacing
64px 4rem Display type or section spacing

PX to REM formula

To convert pixels to rem, divide the pixel value by the root font size: rem = px / root font size. With the common 16px root font size, 16px is 1rem, 24px is 1.5rem, and 32px is 2rem.

PX to REM

24px / 16px = 1.5rem

REM to PX

1.5rem x 16px = 24px

Last updated:

Individual pixel conversion pages

Jump to a dedicated page for common CSS pixel values - each includes the formula, rem result at 16px base, and a copy-ready CSS snippet.

When should you use rem instead of px?

Use rem for typography, spacing, and component dimensions that should scale with the user's root font-size preference. MDN describes rem as a root element font-relative length unit, which means it is based on the font size of the html element rather than the current component.

  • Good rem use cases

    Font sizes, padding, margins, gaps, buttons, cards, form controls, and layout rhythm.

  • Good px use cases

    One-pixel borders, bitmap image dimensions, hairline dividers, and exact icon strokes.

PX to REM FAQ

How do you convert px to rem?

Convert px to rem by dividing the pixel value by the root font size. With the common 16px browser default, 24px equals 1.5rem because 24 / 16 = 1.5.

How do you convert rem to px?

Convert rem to px by multiplying the rem value by the root font size. With a 16px root font size, 1.25rem equals 20px because 1.25 x 16 = 20.

What is 1rem in pixels?

1rem equals the font size of the root html element. In many browsers the default root font size is 16px, so 1rem is commonly 16px unless the site or user changes that setting.

Should I use px or rem in CSS?

Use rem for scalable typography, spacing, and component sizing that should respond to the user's root font-size preference. Use px for values that should stay fixed, such as one-pixel borders or precise raster image dimensions.

Related Dev Tools

Calculator hubs

Related guides