About CSS Unit Reference & Live Calculator
Comprehensive reference guide for all W3C CSS Values and Units Module Level 4 specifications. Explore absolute units (px, pt, in, cm, mm), font-relative units (rem, em, ch, cap, lh), viewport units (vw, vh, dvh, svh, lvh), container query units (cqw, cqh), angles, and time units. Includes a real-time bi-directional unit conversion calculator.
Key Capabilities & Features
- Complete cheatsheet for all 40+ CSS units across absolute, relative, viewport, and container queries
- Interactive bi-directional unit converter between px, rem, em, pt, in, cm, vw, and vh
- Custom root font size configuration (default 16px) for accurate rem calculations
- Clear explanations of modern CSS Level 4 units (dvh, svh, lvh, cqw, cqi)
- Practical responsive design recommendations and layout best practices
How to Use CSS Unit Reference & Live Calculator
Explore Units
Filter units by absolute, font-relative, viewport, or container query categories.
Use Live Converter
Enter any numeric value and select your source and target units.
Adjust Base Root (px)
Change the base root font size if your project uses a custom base (e.g. 10px or 16px).
Copy Converted CSS
Copy the calculated CSS value directly into your stylesheet.
Privacy & In-Browser Execution Guarantee
100% Client-Side. Calculations and conversions execute instantaneously in-browser.
Frequently Asked Questions
Why should I use rem instead of px for font sizes?
rem units scale proportionately with the user browser font size preferences (critical for accessibility), whereas hardcoded px units ignore user browser zoom and accessibility settings.
What is the difference between dvh and vh on mobile devices?
vh is fixed to the initial viewport height and gets cut off when mobile address bars expand. dvh (Dynamic Viewport Height) automatically adapts as browser navigation bars retract and expand.