Tutorials Logic, IN +91 8092939553 info@tutorialslogic.com
Navigation
Home About Us Contact Us Blogs FAQs
Tutorials
All Tutorials
Services
Academic Projects Resume Writing Interview Questions Website Development
Compiler Tutorials


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.

Ready to Level Up Your Skills?

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