CSS Tools

CSS Unit Converter

Convert CSS units in your browser. Translate px, rem, em, percent, vw, and vh with custom root, container, and viewport sizes.

  • Runs in your browser
  • No account required
  • Copy-ready output

CSS value

Convert px, rem, em, %, vw, and vh with your own base values
CSS

Converted units

Copy-ready CSS values

Convert px, rem, em, percent, vw, and vh

Set root font size, container width, and viewport size

Copy a full conversion table

Runs without uploading layout values

Notes

How this tool handles your input

This CSS unit converter helps translate one value into the units you need for layout work. Set the root font size, container width, and viewport size to match the page you are debugging.

How to use

  1. Enter a numeric CSS value.
  2. Choose the unit you are starting from.
  3. Adjust root, container, and viewport settings if needed.
  4. Click Convert CSS Units and copy the values you need.

Good for

  • Convert design specs from px to rem
  • Check viewport-based layout values
  • Translate percentage widths into pixels

Examples

px to rem

Input
24px with a 16px root
Output
1.5rem

vw to px

Input
50vw with a 1440px viewport
Output
720px

FAQ

Is rem based on the root font size?

Yes. The rem conversion uses the root px value you enter.

What does percent convert against?

Percent uses the container px value because percentage sizing depends on context.

Does this know my actual CSS layout?

No. Enter the root, container, and viewport values from the layout you are checking.

Is my data uploaded to a server?

No. The tool runs in your browser, so the text you paste stays on your device.