CSS Unit Converter
Convert between CSS units (px, em, rem, %, pt) with live calculations.
Enter a value in any CSS unit and see its equivalent in every other unit, with a live root-font-size control so you can preview how your design behaves at different zoom levels and accessibility settings.
Common use cases: translating designer-supplied pixel values into rem for a scalable design system, computing the percentage equivalent of a parent-based width, double-checking that a 1rem value lands where you expect, and teaching the relationship between viewport, font, and percentage units.
Conversion
CSS Units Guide
Frequently asked questions
When should I use rem vs em vs px?
Why does 1rem default to 16px?
html { font-size: 18px }, 1rem becomes 18px. Some sites use html { font-size: 62.5% } so 1rem = 10px and math becomes easier — at the cost of inheriting weird defaults elsewhere.What's the difference between % and em for nested elements?
% in a property like width is relative to the parent's width, while em is always relative to font size. For typography use em; for layout dimensions, prefer % or modern container/viewport units.What about vw, vh, dvh — should I use them?
vw, vh) are great for full-screen elements. On mobile, prefer the new dynamic equivalents (dvh, svh) for heights — they account for the browser's collapsing toolbar, which old vh doesn't.Other Converters
View all tools →Image to Base64
Convert images to Base64 encoded strings
Roman Numeral Converter
Convert between numbers and Roman numerals
Temperature Converter
Convert between Celsius, Fahrenheit, and Kelvin
Base Converter
Convert numbers between different bases (binary, octal, hex, etc.)
Color Converter
Convert colors between HEX, RGB, HSL, and more formats
JSON to TypeScript
Convert JSON to TypeScript type definitions
JSON to Rust
Convert JSON to Rust struct definitions
Text Case Converter
Convert text between different cases (camelCase, snake_case, etc.)
Unix Time Converter
Convert between Unix timestamps and readable dates
Timezone Converter
Convert times between timezones worldwide for meetings and global coordination
JSON to CSV
Convert JSON arrays to CSV format for spreadsheets and data export
CSV to JSON
Convert CSV data to JSON format for APIs and applications