CSS Unit Converter
Convert between CSS units online for free. PX to REM, EM to PX, PT to PX, and more. Set your base font size for accurate conversions.
Runs entirely in your browser — files never uploaded
px
16
rem
1
em
1
pt
12
%
100
vw
0.8333
vh
1.4815
Conversion Reference
1rem = 16px (base font size)
1pt = 1.3333px
100% = 16px (of base)
1vw = 19.2px (assuming 1920px viewport)
1vh = 10.8px (assuming 1080px viewport)
How to use CSS Unit Converter
- 1. Set your base font size. Defaults to 16px, the browser standard. Adjust if your project uses a different base.
- 2. Enter a value. Type any number and select the source unit (px, rem, em, pt, %, vw, vh).
- 3. Copy results. All conversions are shown at once. Click any copy button to grab a value.
FAQ
Why is the default base 16px?
Browsers use 16px as the default root font size. REM and EM calculations depend on this value.
What is the difference between rem and em?
REM is relative to the root font size. EM is relative to the parent element's font size. This tool treats both the same using the base value.
How are vw and vh calculated?
1vw = 1% of the viewport width, 1vh = 1% of the viewport height. This tool assumes a 1920x1080 viewport for conversions.
Related tools
- Base64 EncoderEncode text or files to Base64 or decode Base64 back online for free. Instant conversion, no signup, runs in your browser.
- JSON FormatterFormat and validate JSON online for free. Beautify with indentation, validate syntax, or minify. Runs in your browser, no signup.
- CSV ↔ JSONConvert CSV to JSON or JSON to CSV online for free. Live preview as you type or upload a file. No signup, runs in browser.
- Timestamp ConverterConvert Unix timestamps to dates and dates to timestamps online for free. Supports seconds, milliseconds, ISO 8601. No signup.
- JWT DecoderDecode JWT tokens online for free. Inspect header, payload, and claims. Verify expiration and signature algorithm. No signup, runs in browser.
- Regex TesterTest regular expressions online for free with live match highlighting, capture groups, and flag toggles. Supports JavaScript regex. No signup.
Advertisement