PX
CSS Units Converter
Convert between px, rem, em, vw, vh, and other CSS units
Conversion Results
| Unit | Value | CSS | Copy |
|---|---|---|---|
pxPixels | 16 | 16px | |
remRoot em | 1 | 1rem | |
emEm | 1 | 1em | |
vwViewport width | 0.8333 | 0.8333vw | |
vhViewport height | 1.4815 | 1.4815vh | |
%Percentage | 0.8333 | 0.8333% |
Quick Reference (base: 16px)
| px | rem | vw | vh | Note |
|---|---|---|---|---|
| 1 | 0.0625 | 0.0521 | 0.0926 | 1px |
| 4 | 0.25 | 0.2083 | 0.3704 | 0.25rem |
| 8 | 0.5 | 0.4167 | 0.7407 | 0.5rem |
| 12 | 0.75 | 0.625 | 1.1111 | 0.75rem |
| 14 | 0.875 | 0.7292 | 1.2963 | Body small |
| 16 | 1 | 0.8333 | 1.4815 | 1rem (base) |
| 18 | 1.125 | 0.9375 | 1.6667 | 1.125rem |
| 20 | 1.25 | 1.0417 | 1.8519 | 1.25rem |
| 24 | 1.5 | 1.25 | 2.2222 | 1.5rem |
| 32 | 2 | 1.6667 | 2.963 | 2rem |
| 48 | 3 | 2.5 | 4.4444 | 3rem |
| 64 | 4 | 3.3333 | 5.9259 | 4rem |
What is CSS Units Converter?
Convert CSS units between pixels, rem, em, viewport width (vw), viewport height (vh), and percentages. Set your base font size and viewport dimensions for accurate conversions. Essential for responsive web design when you need to switch between absolute and relative units. See conversion results for all units simultaneously.
How to Use CSS Units Converter
- 1Enter a value in any CSS unit (px, rem, em, vw, vh)
- 2Set the base font size (default 16px) for accurate rem/em conversions
- 3Set viewport dimensions for vw/vh conversions
- 4See all equivalent values update in real time
Frequently Asked Questions
px (pixels) are absolute units. rem is relative to the root element's font size (usually 16px). em is relative to the parent element's font size. rem is preferred for consistent sizing across the page, while em is useful for component-specific scaling.
rem units respect the user's browser font size settings, making your site more accessible. If a user increases their default font size, rem-based layouts scale proportionally. px ignores user preferences and always renders at the exact pixel size.
vw (viewport width) and vh (viewport height) are relative to the browser window size. 1vw = 1% of the viewport width, and 1vh = 1% of the viewport height. They're useful for full-screen sections, responsive typography, and fluid layouts.
Related Tools
B64
Base64 Encoder/Decoder
Encode text to Base64 or decode Base64 strings instantly
🎨
Color Converter
Convert colors between HEX, RGB, HSL formats with live preview
PDF
PDF Merge & Split
Merge multiple PDFs into one or split a PDF into separate pages
CSV
JSON to CSV Converter
Convert JSON arrays to CSV format for spreadsheets and databases