CSS Unit Converter
Convert between px, rem, em, vw, vh, and pt instantly.
| Unit | Value | Copy CSS |
|---|---|---|
| px(input) | 16 | |
| rem | 1 | |
| em | 1 | |
| vw | 0.833333 | |
| vh | 1.48148 | |
| pt | 12 |
CSS units explained
px is an absolute pixel — it never scales. rem is relative to the root font-size (usually 16 px) — preferred for spacing and typography because it respects user browser zoom. emis relative to the current element's font-size (which makes it tricky in nested elements; at root level it equals rem). vw / vh are 1% of the viewport width / height — great for fluid layouts. pt is a print unit: 1pt = 96/72 px ≈ 1.333 px. For a deeper dive into unit-aware spacing, try the PX to REM Converter.
Related Design & CSS tools
Color Converter
Convert a color to HEX, RGB, HSL, HSB, and CMYK at once.
HEX to RGB
Convert HEX color codes to RGB / RGBA values.
RGB to HEX
Convert RGB values into HEX color codes.
CSS Box Shadow Generator
Visually design CSS box-shadow with a live preview and code.
CSS Border Radius Generator
Visually craft border-radius with a live preview.
HEX to CMYK
Convert HEX colors to CMYK print values.
CMYK to HEX
Convert CMYK print values to HEX colors.
HEX to HSB
Convert HEX colors to HSB / HSV values.