frontendhack-logo
256px = 16rem

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

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

How to convert 256px to rem

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

256px is a very large size, typically used for hero headings, containers and big layout dimensions.

256px at different root font sizes

Root font sizeInputResult
10px256px25.6rem
12px256px21.3333rem
14px256px18.2857rem
15px256px17.0667rem
16px256px16rem
18px256px14.2222rem
20px256px12.8rem
22px256px11.6364rem
24px256px10.6667rem

CSS examples

font-size: 16rem; /* 256px */
padding: 16rem;
margin-bottom: 16rem;
width: 16rem;

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

font-size: 256px;
padding: 256px;

Tailwind CSS equivalent

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

Nearby values

PixelsREM
256px16rem
2px0.125rem
3px0.1875rem
4px0.25rem
5px0.3125rem
6px0.375rem

Frequently Asked Questions

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

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

Yes. If the root font size is 18px, 256px equals 14.2222rem, and at 20px it equals 12.8rem. 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.