CSS Unit Converter

Convert between px, rem, em, vh, vw, and other CSS units based on your root font size settings

Common Conversions (base: 16px)

pxrempt
12px0.75rem9.0pt
14px0.875rem10.5pt
16px1rem12.0pt
18px1.125rem13.5pt
20px1.25rem15.0pt
24px1.5rem18.0pt
32px2rem24.0pt
48px3rem36.0pt
64px4rem48.0pt
96px6rem72.0pt

How to Use This Tool

1

Enter a numeric value and select the source unit (px, rem, em, %, vw, vh, pt, cm, mm, in).

2

All other unit conversions are calculated and displayed instantly.

3

Set your base font size (for rem/em) and viewport dimensions (for vw/vh).

4

Click any result card to copy the value.

About This Tool

CSS Unit Converter converts between all common CSS units: px, rem, em, %, vw, vh, pt, cm, mm, and in. Enter a value in any unit and see all conversions simultaneously. Customize the base font size (default 16px) for accurate rem/em calculations, and set viewport dimensions for vw/vh conversions. Includes a quick reference table of common px-to-rem conversions.

Frequently Asked Questions

rem is relative to the root element's font size (usually 16px). em is relative to the parent element's font size. For predictable sizing, rem is generally preferred.

rem and em units are calculated relative to a font size. Browsers default to 16px, but if you've changed the root font size in your CSS, update this value for accurate conversions.

Share This Tool

Related Tools

Back to Design & CSS