Tutorials Logic
Tutorials Logic, IN info@tutorialslogic.com
Navigation
Home About Us Contact Us Blogs FAQs
Tutorials
All Tutorials
Services
Academic Projects Resume Writing Website Development
Practice
Quiz Challenge Interview Questions Certification Practice
Tools
Online Compiler JSON Formatter Regex Tester CSS Unit Converter Color Picker
Compiler Tools

CSS Unit Converter

Base font size px
Viewport width px
Viewport height px
Parent font size px (for em)
Converter
Reference Table
Click any field and type a value - all others update instantly
Formula: Enter a value in any field to see the conversion formula
Absolute Units
Relative Units
Unit Equivalent (base 16px) Type Description Best Used For
px1px = 1pxAbsolutePixels - screen dotsBorders, shadows, precise sizing
rem1rem = 16pxRelativeRoot element font sizeFont sizes, spacing (scalable)
em1em = 16px*RelativeParent element font sizePadding/margin relative to font
%100% = parent sizeRelativePercentage of parentWidths, heights, fluid layouts
vw1vw = 14.4px*Viewport1% of viewport widthFull-width sections, fluid type
vh1vh = 9px*Viewport1% of viewport heightFull-height sections, hero areas
vmin1vmin = min(vw,vh)Viewport1% of smaller viewport dimensionSquare elements, responsive icons
vmax1vmax = max(vw,vh)Viewport1% of larger viewport dimensionBackground sizing
pt1pt = 1.333pxAbsolutePoints (print)Print stylesheets
pc1pc = 16pxAbsolutePicas (print)Print stylesheets
cm1cm = 37.795pxAbsoluteCentimetersPrint layouts
mm1mm = 3.779pxAbsoluteMillimetersPrint layouts
in1in = 96pxAbsoluteInchesPrint layouts
ch- width of "0"RelativeWidth of the "0" characterInput widths, monospace layouts
ex- 0.5emRelativex-height of current fontVertical alignment

* Values marked with asterisk depend on viewport/parent settings above.

About CSS Unit Converter

This CSS unit converter helps developers translate values between px, rem, em, viewport units, and print units so responsive layouts stay consistent across devices.

Key Features

  • Convert between px, rem, em, vh, vw, pt, mm, cm, and more.
  • Adjust the base font size to match your project setup.
  • Use live calculations while designing responsive layouts.

How To Use CSS Unit Converter

  1. Enter a source value in the unit field you want to convert from.
  2. Set the base font size when working with rem or em values.
  3. Copy the converted value into your stylesheet or design system.

CSS Unit Converter FAQs

Is this tool useful for responsive design?

Yes. It is especially useful when switching between px, rem, em, and viewport-based units in responsive interfaces.

Why does base font size matter?

Base font size affects rem and em conversions, so matching it to your project gives you accurate output.

Ready to Level Up Your Skills?

Explore 500+ free tutorials across 20+ languages and frameworks.