CSS Unit Converter
A central hub for converting between every common CSS length unit. Pick the converter you need below or browse the reference table.
CSS Unit Reference
| Unit | Description |
|---|---|
| px | Absolute pixel. Predictable but ignores user font preferences. |
| rem | Relative to the root font size. Best default for typography and spacing. |
| em | Relative to the parent font size. Compounds when nested. |
| % | Relative to the parent's corresponding property. |
| vw / vh | 1% of the viewport width / height. |
| vmin / vmax | 1% of the smaller / larger viewport dimension. |
| ch | Width of the '0' glyph in the current font. |
| ex | Approximate x-height of the current font. |
| pt | Print unit. 1pt ≈ 1.333px on screen. |
| pc | Pica. 1pc = 12pt = 16px. |
Related Converters
PX to REM Converter
Convert pixels to rem instantly.
REM to PX Converter
Convert rem to pixels instantly.
PX to EM Converter
Convert pixels to em units.
EM to PX Converter
Convert em units back to pixels.
PX to Percentage Converter
Convert pixels to %.
Percentage to PX Converter
Convert % to pixels.
Tailwind Spacing Converter
Pixels ↔ Tailwind spacing scale.
Tailwind Size Converter
Pixels ↔ Tailwind size utilities.