Skip to content
uxTools
Design & CSS

CSS Unit Converter

Convert any CSS unit to any other instantly. Configure root / parent font size, viewport dimensions, container width, and character size to get accurate results. Bulk mode rewrites entire CSS blocks.

Single conversion

Enter a value, pick a source and target unit. Every other unit is computed too — see the grid below.

Result
1rem

16px = 1rem (1rem = 16px).

Context settings

Anchor relative units. Settings persist in your browser and apply to every conversion.

px

Pixels per 1rem.

px

Pixels per 1em for the current element's parent.

px

Pixels per 100vw — also feeds vmin / vmax.

px

Pixels per 100vh — also feeds vmin / vmax.

px

Pixels per 100% in the enclosing container.

px

Width of the '0' glyph in the current font (anchors ch).

px

Height of the 'x' glyph in the current font (anchors ex).

All targets

Equivalents for 16px across every supported CSS unit. Click any card to copy.

px
16px
p-4 / m-4
rem
1rem
16px
em
1em
16px
vw
1.25vw
16px
vh
2.2222vh
16px
vmin
2.2222vmin
16px
vmax
1.25vmax
16px
pt
12pt
16px
pc
1pc
16px
%
1.25%
16px
cm
0.4233cm
16px
mm
4.2333mm
16px
in
0.1667in
16px
ch
1.9048ch
16px
ex
2ex
16px

Quick reference

Common pixel sizes converted with default settings (16px root, 1280×720 viewport).

Pixelsremempt%vwvhTailwind hint
1px0.063rem0.063em0.75pt0.078%0.078vw0.139vh
8px0.5rem0.5em6pt0.625%0.625vw1.111vhp-2 / m-2
16px1rem1em12pt1.25%1.25vw2.222vhp-4 / m-4
24px1.5rem1.5em18pt1.875%1.875vw3.333vhp-6 / m-6
32px2rem2em24pt2.5%2.5vw4.444vhp-8 / m-8
48px3rem3em36pt3.75%3.75vw6.667vhp-12 / m-12
64px4rem4em48pt5%5vw8.889vhp-16 / m-16
96px6rem6em72pt7.5%7.5vw13.333vhp-24 / m-24
128px8rem8em96pt10%10vw17.778vhp-32 / m-32

Tailwind 4 anchors spacing to 0.25rem steps (4px each at the 16px root). Type ramp values map to text-* utilities.