CSS Unit Converter
Type a value in any CSS unit and see it instantly converted to all the others. Customize the root font size (default 16 px) for rem, the parent font size for em and %, and the viewport dimensions for vw and vh. Handy for translating designs into Tailwind / CSS values, sanity-checking responsive font sizes, or remembering how 1rem maps to px in a non-default setup.
Base sizes (root, parent, viewport)
All units
- px16.000
- rem1
- em1
- pt12.000
- vw1.1111
- vh1.7778
- %100.00
How to use
- Type a value and pick a source unit (px, rem, em, pt, vw, vh, %).
- All other units update instantly.
- Expand the 'base sizes' panel to change root / parent font size or viewport.
- Copy the formatted value next to any unit.
Frequently asked questions
- Why are rem and em different?
- rem is relative to the document root (html font-size, default 16 px). em is relative to the parent element. They're equal only when the parent itself uses the root size.
- Why does pt = 1.333 px?
- CSS defines 1 in = 96 px and 1 pt = 1/72 in, so 1 pt = 96/72 ≈ 1.333 px.
- Are vw / vh accurate?
- They use the viewport width and height you enter in the base-sizes panel. Default 1440 × 900 matches a common desktop; change them to match your design canvas.
- What about %?
- % is computed against the parent font size (treated the same as em for typography). For other CSS properties, % depends on the property's containing block.
Related tools
CSS clamp() Calculator (Fluid Typography)
Build a fluid `font-size: clamp(...)` that scales smoothly between two viewport widths — copy a one-liner.
Unit Converter
Convert length, weight, temperature, area, volume, speed, and time.
Density Converter
Convert density between kg/m³, g/cm³, g/mL, kg/L and lb/ft³, lb/in³, lb/gal, oz/in³, oz/gal and slug/ft³ — all at once.
Flow Rate Converter
Convert volumetric flow between m³/s, m³/h, L/s, L/min, L/h, mL/min, ft³/s, CFM, GPM, GPH, imperial gal/min and bbl/day — all at once.
Angle Unit Converter (Degrees · Radians · Gradians · DMS)
Convert any angle between degrees, radians, gradians, turns, milliradians, arcminutes, arcseconds, and DMS — with live SVG preview and π-fraction recognition.
Byte Size Converter (KB / KiB / MB / MiB / ...)
Convert between decimal (KB, MB, GB — SI base 1000) and binary (KiB, MiB, GiB — IEC base 1024) byte units, plus bits.