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)
| px | rem | pt |
|---|---|---|
| 12px | 0.75rem | 9.0pt |
| 14px | 0.875rem | 10.5pt |
| 16px | 1rem | 12.0pt |
| 18px | 1.125rem | 13.5pt |
| 20px | 1.25rem | 15.0pt |
| 24px | 1.5rem | 18.0pt |
| 32px | 2rem | 24.0pt |
| 48px | 3rem | 36.0pt |
| 64px | 4rem | 48.0pt |
| 96px | 6rem | 72.0pt |
How to Use This Tool
Enter a numeric value and select the source unit (px, rem, em, %, vw, vh, pt, cm, mm, in).
All other unit conversions are calculated and displayed instantly.
Set your base font size (for rem/em) and viewport dimensions (for vw/vh).
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
Color Palette Generator
Generate harmonious color palettes with complementary, analogous, and triadic color scheme support
Color Contrast Checker
Check WCAG 2.1 color contrast ratios to ensure your designs meet AA and AAA accessibility standards
CSS Gradient Generator
Build stunning linear and radial CSS gradients with a visual color picker, angle control, and code export
Glassmorphism Generator
Create modern frosted-glass UI effects with adjustable blur, transparency, and border styling in pure CSS
Neumorphism Generator
Design elegant soft-shadow neumorphic UI elements with customizable depth, color, and shape controls