frontendhack-logo
32px = 2rem

At the default root font size of 16px, 32px is exactly 2rem.

Calculation based on a root font-size of 16 pixels.

How to convert 32px to rem

To convert pixels to rem, divide the pixel value by the root font size: rem = px ÷ 16. For 32px that is 32 ÷ 16 = 2rem.

32px is a large size, common for headings, section padding and generous layout gaps. It is often used for page headings and large spacing.

32px at different root font sizes

Root font sizeInputResult
10px32px3.2rem
12px32px2.6667rem
14px32px2.2857rem
15px32px2.1333rem
16px32px2rem
18px32px1.7778rem
20px32px1.6rem
22px32px1.4545rem
24px32px1.3333rem

CSS examples

font-size: 2rem; /* 32px */
padding: 2rem;
margin-bottom: 2rem;
width: 2rem;

The same values in pixels, if you need a fixed size:

font-size: 32px;
padding: 32px;

Tailwind CSS equivalent

The default spacing scale has a step for 2rem: use classes like p-8, m-8, gap-8, w-8 and h-8.

Nearby values

PixelsREM
32px2rem
2px0.125rem
3px0.1875rem
4px0.25rem
5px0.3125rem
6px0.375rem

Frequently Asked Questions

32px equals 2rem when the root font size is the browser default of 16px. The calculation is 32 ÷ 16 = 2.

2rem equals 32px at a 16px root font size (2 × 16 = 32).

Yes. If the root font size is 18px, 32px equals 1.7778rem, and at 20px it equals 1.6rem. The pixel value itself never changes, only the rem equivalent. Use the base font size field above to try any value.

Prefer rem for font sizes, spacing and layout so they respect the user's browser font settings and scale for accessibility. Use px for details that should never scale, such as 1px borders or fixed icon sizes.