CSS unit converter
Convert px, rem, em and vw using font sizes and viewport width you provide.
Tool guide
How to use CSS unit converter
Convert px, rem, em and vw using font sizes and viewport width you provide.
- Enter the values and choose the operation or units. Read the supported limits beside the inputs; try the labelled sample to see an example.
- CSS pixels are not physical pixels. em uses the supplied element font reference; for a font-size declaration, supply its parent font size. The tool does not inspect a live layout.
- Choose Convert CSS length. Review the result, then download the text result. Editing inputs invalidates old results.
- Calculations are local and unmetered. Inputs and results are not uploaded or saved to your account; leaving the page clears them. Downloaded files remain on your device.
Common questions
What are the limits of CSS unit converter?
Value ±10^9; positive font sizes ≤512 CSS px; positive viewport width ≤100,000 CSS px. CSS pixels are not physical pixels. em uses the supplied element font reference; for a font-size declaration, supply its parent font size. The tool does not inspect a live layout.