Choose source and destination units, then set a base font size.
The CSS Unit Converter translates measurements using the source unit, destination unit, and base font size you choose. The available lists show px, rem, em, pt, and percent.
CSS rem refers to the root font size. For properties such as padding, em refers to the element's font size; font-size itself uses the inherited size as its reference. Viewport units vw and vh refer to viewport dimensions, but they are not in this converter's displayed unit lists.
Using rem can help maintain a root-based spacing scale. The result still depends on your page's computed font sizes and styles. Converting a unit by itself does not establish an accessible or responsive layout.
24px16px1.5remWith a 16px root, the calculation is 24 ÷ 16 = 1.5rem. Use the actual reference size from your project rather than assuming that every root is 16px.
rem and em do not necessarily have the same reference size. Use rem for a root-based value and em deliberately when the local font size is the appropriate reference.
The meaning of em also depends on the property being set, while rem uses the root font size. Percentages are property-dependent too. A calculator with one base size cannot infer every layout context, and this page does not show viewport-dimension inputs.
Continue styling with the CSS Color Converter and CSS Border Radius Generator.
How to Use CSS Unit Converter - Convert px, rem, and em
Enter the base size in Base Font Size (px). Match it to the reference your CSS property uses.
Enter Value, then select From Unit and To Unit. The lists show px, rem, em, pt, and percent.
Use the copy control for the result, then check it in your stylesheet. Relative units and percentages depend on the property and layout.
Choose source and destination units, then set a base font size.
Tool Use:
5Added:
Sep 11, 2026Type:
Free ToolPrivacy:
Client SideConvert temperature values between Celsius, Fahrenheit, and Kelvin.
Roman numeral converter for numbers from 1 to 3,999. Convert in either direction, review the steps, and copy the number or numeral.