Processing and privacy
Processing varies by tool. Check the instructions for local processing, server requests, external services and any file or request limits before entering sensitive information.
Read the privacy policyShare this tool
Found it useful? Send it to a friend or teammate.
Rate this tool
5.0
1 rating
- 5 stars 1
- 4 stars 0
- 3 stars 0
- 2 stars 0
- 1 star 0
Clear instructions
Find steps, examples and limitations below.
Use online
Open the tool in a supported web browser.
Free to use
No sign-up required. Tool-specific limits may apply.
How to use the CSS Unit Converter
Convert CSS lengths using explicit font and viewport reference sizes.
- 1 Enter Value and choose its Unit.
- 2 Set Root font size, Parent font or size, Viewport width and Viewport height to match your page.
- 3 Click a converted value to copy it.
Example and practical tips
With a 16px root font size, 32px corresponds to 2rem.
Frequently asked questions
Are em and rem always the same?
No. rem refers to the root font size; em depends on the applicable font-size context. Enter the correct reference values.
Are percentage conversions universal?
No. CSS percentages depend on the property and containing block. This tool uses the supplied parent reference, so verify it matches your use case.
Practical guides
-
How to Use CSS Unit Converter
Convert CSS units: px to rem, em, pt, vw, vh and percent, using your own root font size and viewport. Free online CSS unit converter, copy the value.
Report an issue
Something broken or not quite right? Tell us and we will look into it.