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 size | Input | Result |
|---|---|---|
| 10px | 256px | 25.6rem |
| 12px | 256px | 21.3333rem |
| 14px | 256px | 18.2857rem |
| 15px | 256px | 17.0667rem |
| 16px | 256px | 16rem |
| 18px | 256px | 14.2222rem |
| 20px | 256px | 12.8rem |
| 22px | 256px | 11.6364rem |
| 24px | 256px | 10.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
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.
