📏

CSS Unit Converter

Convert between CSS units — px, em, rem, pt, %, vw, vh — with configurable base font size and viewport dimensions.

Loading tool...

About This Tool

CSS uses many different units and converting between them by hand is tedious and error-prone. The CSS Unit Converter handles all common length units in one place: absolute units like px and pt, relative font units like em and rem, viewport units vw and vh, and the percentage unit relative to a parent element. Set your base font size (default 16px), viewport width and height, and parent element width for percentage calculations. Then type a value in any unit and all other equivalent values update instantly in the table below. You can also use it as a quick reference chart. Useful when building responsive layouts, converting design specs from pt to px, or checking that your rem-based spacing matches a specific pixel target across different screen sizes.