Developer Tools - Free Online Utilities

    Multiline Formatter
    Text Case Converter
    Lorem Ipsum Generator
    Text Sort & Dedup Tool
    Unicode & Emoji Browser
    CSV to JSON/XML Converter

    CSS Unit Converter
    CSS Formatter & Minifier
    HTML Entity Tool
    Markdown Editor & Preview
    Markdown to HTML Converter

CSS Unit Converter

Comprehensive CSS unit converter with 20+ units, visual preview, responsive analysis, CSS generation, and device presets.

Convert CSS Units
Conversion Results (26 units)
UnitValueTypeDescriptionCopy
px16.0000px
absolute
Device pixels, most common unit
pt12.0000pt
absolute
1/72 of an inch, used in print
pc1.000000pc
absolute
12 points, typography unit
in0.166667in
absolute
Physical inches
cm0.423333cm
absolute
Physical centimeters
mm4.233333mm
absolute
Physical millimeters
Q16.9333Q
absolute
Quarter of a millimeter
rem1.000000rem
relative
Relative to root element font size
em1.000000em
relative
Relative to parent element font size
ex2.000000ex
relative
Height of lowercase x
ch1.666667ch
relative
Width of character "0"
lh0.833333lh
relative
Line height of element
rlh0.833333rlh
relative
Line height of root element
%100.000%
relative
Relative to parent element
vw0.833333vw
viewport
1% of viewport width
vh1.481481vh
viewport
1% of viewport height
vmin1.481481vmin
viewport
1% of smaller viewport dimension
vmax0.833333vmax
viewport
1% of larger viewport dimension
vi0.833333vi
viewport
1% of viewport inline axis
vb1.481481vb
viewport
1% of viewport block axis
cqw0.833333cqw
container
1% of container width
cqh1.481481cqh
container
1% of container height
cqi0.833333cqi
container
1% of container inline size
cqb1.481481cqb
container
1% of container block size
cqmin1.481481cqmin
container
1% of smaller container dimension
cqmax0.833333cqmax
container
1% of larger container dimension
Device Presets
Context Settings

Used for rem, em, and % calculations

Used for vw, vmin, vmax calculations

Used for vh, vmin, vmax calculations

CSS Unit Guide

px: Pixels, most common for precise control

pt: Points (1/72 inch), used in print

in, cm, mm: Physical measurements

rem: Relative to root font size (best for scaling)

em: Relative to parent font size

%: Percentage of parent element

ch: Width of "0" character

vw/vh: 1% of viewport width/height

vmin/vmax: 1% of smaller/larger viewport dimension

vi/vb: Inline/block axis (writing mode aware)

cqw/cqh: 1% of container width/height

cqi/cqb: 1% of container inline/block size

Modern units for container-based responsive design