CSS Unit Converter

1rem

px
Pixels (PX) to REM
REM to Pixels (PX)
Inches (IN) to Pixels (PX)
Pixels (PX) to Inches (IN)
Centimeters (CM) to Pixels (PX)
Pixels (PX) to Centimeters (CM)
Understanding the Centimeters (CM)
  • Centimeters (96 PPI): This column shows the centimeter equivalent for a standard PPI of 96, common in web design.
  • Centimeters (300 PPI): This column shows the centimeter equivalent for a PPI of 300, common for high-quality printing.
The Role of PPI (Pixels Per Inches)

The conversion isn’t a direct 1:1 relationship. Here’s why:

  • PPI (Pixels Per Inches): PPI indicates the pixel density of a screen or image. A higher PPI means more pixels in the same physical space, resulting in a sharper image.
  • To convert pixels to centimeters, you MUST know the PPI of the image or the intended display device.
Conversion Formula

The basic formula for the conversion is:

Size (cm) = Size (px) / PPI * 2.54

Where:

  • 2.54 is the conversion factor between inches and centimeters.
W3Schools − CSS units MDN − CSS values and units MDN − CSS <length> Caniuse − rem browsers support