Convert CSS units instantly: px to rem, rem to em, px to vw/vh, pt, and percent. Set custom base font size and viewport dimensions for accurate results.
What is CSS Units Converter?
CSS Units Converter is a free online tool that converts any CSS length value between all common units: px,
rem, em, pt, pc, vw, vh, and percent. Enter a value in any unit and instantly see the equivalent in every
other unit. Configure the root font size, parent element size, and viewport dimensions to get accurate
context-aware conversions that match your project's CSS setup exactly.
When to use it?
Use CSS Units Converter when translating design specs from tools like Figma (which outputs px values)
into accessible rem values for your stylesheet, converting legacy px-based code to a rem-based design
system, or understanding what viewport-relative values like 2.5vw equal in pixels at a given screen size.
It is also useful when working with CSS-in-JS libraries where you need numeric values rather than CSS strings.
Common use cases
Front-end developers use CSS Units Converter to convert Figma-exported px values to rem for accessible
typography, verify that rem-based spacing values produce the correct pixel output, calculate vw equivalents
for fluid type sizing with clamp(), convert print stylesheets between pt and px, and validate that
percentage-based widths match expected pixel dimensions at specific viewport sizes.