Convert between px, rem, em, %, vw, vh, pt. Set root font size and viewport dimensions.
Runs in your browser
Enter a value above to see conversions
CSS supports a wide variety of length units absolute units like px and pt, and relative units like rem, em, and vw and choosing the right unit is critical for responsive, accessible designs. The CSS Unit Converter helps you translate between these units accurately, taking into account your document's base font size and viewport dimensions so the converted values are contextually correct.
Use the CSS Unit Converter when you need px, rem, em without extra setup.
Example input: Convert 32px with a 16px root font size.
Example result: The equivalent value is 2rem.
The CSS Unit Converter uses browser or server-side parsing rules appropriate to the task. Formatters preserve valid structure while changing whitespace, encoders transform characters into another representation, and validators report whether the input follows the expected syntax.
When a standard exists, such as JSON, URL encoding, HTTP, JWT, YAML, or cron syntax, the tool follows common web-platform behavior as closely as possible.
The CSS Unit Converter is designed for quick practical use. Inputs are handled according to the tool type; browser-based tools keep work local, while live lookup tools may need server-side checks.