Skip to content
Aito

All tools / 04 CSS and design

px to rem converter

rem is relative to the root font size, so layouts follow the user's browser settings. Set your root size (16 px is the browser default) and convert one value, a whole stylesheet, or look one up in the table.

Tailwind spacing: 6 (for example p-6)

Convert a stylesheet

Converted to rem

The converted CSS shows here, ready to copy. Paste your CSS on the left first.

Common sizes at 16 px

Pixel to rem table
pxremTailwind spacingTailwind text
1px0.0625rem
2px0.125rem
4px0.25rem1
6px0.375rem
8px0.5rem2
10px0.625rem
12px0.75rem3text-xs
14px0.875remtext-sm
16px1rem4text-base
18px1.125remtext-lg
20px1.25rem5text-xl
24px1.5rem6text-2xl
28px1.75rem7
32px2rem8
36px2.25rem9text-4xl
40px2.5rem10
44px2.75rem11
48px3rem12text-5xl
56px3.5rem14
64px4rem16
72px4.5rem18
80px5rem20
96px6rem24
128px8rem32