ToolHub
Open Tool

CSS Unit Converter

Convert between CSS units: px, rem, em, pt, vw, vh, cm, mm, in, and % with real-time results

Format Converter

About This Tool

CSS Unit Converter lets you convert between all common CSS length units including px, rem, em, pt, vw, vh, cm, mm, in, and %. It features configurable base font size and viewport dimensions, real-time results for all units simultaneously, and a common size reference table for quick lookups.

Key Features

Quick Preview

Use Cases

css units converter

Frequently Asked Questions

What CSS units are supported?

The converter supports px, rem, em, pt, vw, vh, cm, mm, in, and %. You can convert between any two units and see results for all units simultaneously in the all-units grid.

How does the rem and em conversion work?

The rem and em conversion uses a configurable base font size, which defaults to 16px. You can change this value to match your project's root font size. The em unit is calculated relative to the same base font size.

How are viewport units calculated?

Viewport units (vw and vh) are calculated based on configurable viewport width and height values, defaulting to 1920px and 1080px respectively. You can adjust these to match your target screen dimensions.

Can I copy the conversion results?

Yes, you can click on any result value to copy it to your clipboard. A toast notification confirms the copied value. This works for both the main result and individual unit results in the all-units grid.

What is the common references table?

The common references table shows standard typography sizes like body text, headings, and display sizes in px, rem, and pt. This helps you quickly find the right values for common design patterns without manual calculation.