Convert between px, rem, em, vw, vh, dvh, pt, cm and all modern CSS units instantly.
The CSS Units Converter translates any CSS value between all major unit types — px, rem, em, vw, vh, dvh, svh, lvh, %, pt, cm, mm, and in. You can configure the base font size and viewport dimensions to get accurate real-world conversions for your specific design context.
Enter a numeric value, select its source unit, and every other unit equivalent updates instantly. Adjust the Base Font Size (default 16px) and Viewport Size to match your project's configuration. Use the quick-reference card at the bottom to click any common size and pre-fill the converter.
Modern CSS has a rapidly expanding set of units — especially the new viewport units (dvh, svh, lvh) and container query units. Converting between them mentally is error-prone. This tool handles the math instantly and lets you verify conversions for any screen configuration.
Color Format Converter
Convert colors between HEX, RGB, and HSL formats.
Color Contrast Checker
Check WCAG contrast ratios between text and background colors.
CSS Gradient Generator
Visually build linear and radial CSS background gradients.
CSS Box Shadow Generator
Design custom CSS box shadows with an interactive visualizer.