📐 Convert CM, MM, Inches to Pixels & All CSS Units Instantly

CM to Pixel Converter

Convert centimeters to pixels (px), millimetres, inches, points, picas, em, and rem at any DPI — with a live visual ruler, bulk conversion table, reverse converter, and full CSS unit reference.

Centimeters → All Units

Enter a value in centimetres, pick your screen DPI, and get instant results in every unit.

Screen DPI / PPI
Value in Centimeters (cm)
cm
Current DPI
96 dpi
Quick Value Presets

Reverse Converter — Pixels → All Units

Enter a pixel value and DPI to convert back to centimeters, mm, inches, and other units.

Pixels (px)
px
DPI / PPI
Base Font Size (for em/rem)
px

Bulk Conversion Reference Table

Common centimeter values converted to pixels and all other units at your chosen DPI. Great for print-to-screen design references.

DPI for bulk table
From (cm)
To (cm)
Step
cmpxmminptpcem (16px)rem (16px)

Screen DPI / PPI Calculator

Calculate the exact DPI (dots per inch) or PPI (pixels per inch) of any screen from its resolution and physical size.

Horizontal Resolution (px)
Vertical Resolution (px)
Screen Diagonal Size (inches)
Device Presets

CSS Unit Quick Reference

All CSS length units explained with real-world values at 96 DPI. Click a row to copy the CSS value.

Live CSS Snippet Generator
Value (cm)
CSS Property
DPI
UnitNameDefinitionValue at 96 DPIUse Case
pxPixel1 device pixel at 96 DPI CSS baseline1px = 0.0265cmScreen layouts, borders, shadows
cmCentimeterPhysical centimetre (absolute)1cm = 37.795pxPrint stylesheets, physical measurements
mmMillimeter1/10 of a centimetre1mm = 3.779pxFine-grained print measurements
inInch2.54 centimetres1in = 96pxPrint, US-standard sizes
ptPoint1/72 of an inch1pt = 1.333pxTypography, font sizes in print
pcPica12 points = 1/6 inch1pc = 16pxTraditional typesetting, headlines
emEmRelative to parent font-size1em = 16px (default)Scalable typography, responsive spacing
remRoot EmRelative to root (html) font-size1rem = 16px (default)Consistent responsive design
vwViewport Width1% of viewport widthContext-dependentFull-width layouts, fluid sizing
vhViewport Height1% of viewport heightContext-dependentFull-height sections, hero panels
%PercentRelative to parent dimensionParent-dependentFlexible boxes, responsive grids
chCharacterWidth of the "0" characterFont-dependentText input widths, readable line length

Share this Tool

The Complete Guide to Converting CM to Pixels: DPI, CSS Units & Screen Measurements

Understanding the relationship between physical measurements like centimeters and digital units like pixels is one of the most fundamental skills in design, print, and web development. This guide explains the math, the context, and the tools you need.

Centimeters vs Pixels: Why They Can't Be Directly Compared

Centimeters (cm) are an absolute physical unit of measurement — 1 centimetre is always exactly 1 centimetre, whether you're measuring a printed page, a piece of furniture, or a screen bezel. Pixels (px), on the other hand, are fundamentally a relative unit. The physical size of a pixel depends entirely on the display it lives on. A pixel on a 96-DPI monitor is larger than a pixel on a 300-DPI phone screen, even though both are called "pixels."

This distinction is the source of enormous confusion for designers, developers, and print professionals who work across both physical and digital mediums. When you design a layout in a design tool like Figma or Adobe XD and specify an element as "3 cm wide," the tool has to make an assumption about how many pixels represent 1 centimetre. That assumption is almost always 96 DPI — the CSS reference DPI established by the W3C — which means 1 cm = 37.795 pixels. But on a high-resolution phone screen at 460 PPI, 37.795 physical pixels would be tiny. Understanding this distinction is the key to producing designs that look correct on both print and screen.

Core Rule: 1 cm = 37.795 pixels at 96 DPI (the CSS/web standard). At any other DPI, the formula is: px = cm × (DPI ÷ 2.54). A 2.54 cm measurement at 96 DPI equals exactly 96 pixels — because 2.54 cm = 1 inch, and at 96 DPI, 1 inch = 96 pixels.

How the CM to Pixel Converter Works — Five Modules

Our converter is built around five specialized tools, each targeting a different aspect of unit conversion and measurement translation. Here's what each module does:

Main Converter (CM → All Units)

Enter any centimetre value and select your DPI (or enter a custom value). The converter instantly outputs pixels, millimetres, inches, points, picas, em, rem, and vw/vh — with a visual ruler strip showing the relative physical size and one-click copy for every unit value.

Reverse Converter (PX → CM)

Works in the opposite direction — enter a pixel value and DPI to get the equivalent in centimetres, mm, inches, pt, pc, em, and rem. Includes a configurable base font size for accurate em/rem calculations. Useful when you need to convert a pixel-specified design element back into a physical print measurement.

Bulk Conversion Table

Generates a complete reference table from any starting value to any ending value, at configurable step increments, across all units simultaneously. Downloadable as a CSV file — ideal for building a custom cheat sheet for your project's specific DPI or printing it as a desk reference for ongoing design work.

DPI Calculator + CSS Reference

Calculate the exact DPI of any device from its resolution and screen size in inches, with presets for common devices. The CSS Reference tab provides an interactive unit table with live CSS snippet generation — enter a centimetre value and instantly get the correct CSS code for any property in px, cm, mm, em, rem, and pt.

DPI and PPI Explained: The Key to Correct Conversion

DPI stands for Dots Per Inch and PPI stands for Pixels Per Inch. In the digital context, they are essentially interchangeable — both describe the density of pixels or dots in one linear inch of a display or printed output. The DPI value is the single most important factor in any CM to pixel conversion calculation.

Common DPI Standards

  • 72 DPI — Traditional Mac screen standard; also used in Photoshop web exports. 1 cm ≈ 28.35 px.
  • 96 DPI — W3C CSS reference DPI; Windows screen standard. 1 cm = 37.795 px. The default for all web calculations.
  • 150 DPI — Common tablet and mid-range monitor PPI. 1 cm ≈ 59.06 px.
  • 300 DPI — Print industry standard for high-quality print output. 1 cm ≈ 118.11 px.
  • 458 DPI — Apple's iPhone 15 Pro Max. 1 cm ≈ 180.3 px.

Why 96 DPI Is the Web Standard

The W3C (World Wide Web Consortium) established 96 DPI as the CSS reference pixel density in its specification for CSS absolute length units. This means that when you write width: 1cm in a CSS stylesheet, the browser renders it as 37.795 pixels regardless of the actual screen DPI. This reference point ensures consistent physical sizing across different displays in print-media CSS contexts and is the universal baseline for all CM-to-pixel calculations in web design.

The CM to Pixel Conversion Formula

The mathematics of CM to pixel conversion are straightforward once you understand that it always involves the DPI as the bridge between physical and digital measurement. Here are all the key formulas:

CONVERSION FORMULAS
px = cm × (DPI / 2.54)
mm = cm × 10
in = cm ÷ 2.54
pt = cm × (72 / 2.54) // 72 points per inch
pc = cm × (6 / 2.54) // 6 picas per inch
em = px ÷ baseFontPx // typically 16px
rem = px ÷ rootFontPx // html font-size, default 16px

The key constant is 2.54 — the number of centimetres in one inch. All physical-to-digital conversions flow through this constant. At 96 DPI: 1 cm × (96 ÷ 2.54) = 37.795 px. At 300 DPI: 1 cm × (300 ÷ 2.54) = 118.11 px. The DPI changes the result dramatically, which is why always knowing your target DPI is essential before doing any unit conversion.

CSS Units Deep Dive: Absolute vs Relative Units

CSS distinguishes between two fundamental categories of length units — absolute and relative — and understanding this distinction prevents some of the most common mistakes in web design and cross-media publishing.

Absolute CSS Units

Absolute units (cm, mm, in, px, pt, pc) represent fixed physical sizes. A CSS property set in cm will always render at that physical size — on screen, this is calculated at the CSS reference 96 DPI. These units are most appropriate for print stylesheets where physical dimensions matter (page margins, header sizes, print layout). Using absolute units for screen layout is generally discouraged because they don't scale with the user's font preferences or screen size.

Relative CSS Units

Relative units (em, rem, %, vw, vh, vmin, vmax, ch) scale relative to something else — the parent element's font size (em), the root font size (rem), the viewport dimensions (vw, vh), or the parent container (%). These units are the foundation of responsive web design because they automatically adapt to the user's font settings, viewport size, and zoom level. A rem-based layout will always be readable regardless of screen DPI or user font size preferences.

Who Benefits from a CM to Pixel Converter?

The boundary between physical and digital measurement is crossed daily by designers, developers, and print professionals. Anyone working in both print and digital — or designing interfaces with specific physical dimensions — needs a reliable unit converter.

Web & UI Designers

When design briefs specify element sizes in centimeters (common in brand guidelines and print-to-digital adaptations), designers need to translate those physical measurements into pixels for their design tools. The converter is also essential when adapting print layouts for web display at specific DPI targets.

Front-End Developers

Developers implementing designs with specific physical dimensions — kiosk interfaces, digital signage, print CSS stylesheets, or PDF generation — need to convert between centimeters, pixels, points, and em/rem with precision. The CSS snippet generator in the Reference tab produces ready-to-paste code for any property.

Print & Pre-Press Professionals

Print designers working in Adobe InDesign or Illustrator at 300 DPI need to know pixel equivalents for elements that will also appear in digital versions of their publication. The 300 DPI preset converts print measurements directly to the high-resolution pixel values used in print production workflows.

Architects & Engineers

Technical professionals creating digital visualizations of physical spaces often need to convert real-world centimetre measurements into screen pixels for accurate representation at specific display scales. The DPI calculator helps verify that a physical measurement is being represented at the correct pixel density for the target display.

Key Features of Our Advanced CM to Pixel Converter

Five precision conversion tools with live visual feedback, DPI detection, CSS code generation, bulk export, and instant copy — all running privately in your browser.

01

8 Units Simultaneously

One input produces instant output in all eight major units — px, mm, in, pt, pc, em, rem — plus a visual ruler strip showing relative physical size. Every unit card is one-click-copyable, and the full result set downloads as a formatted TXT file for offline reference.

02

DPI Calculator & Device Presets

Calculate the exact DPI of any screen from its resolution and diagonal size, with one-click presets for 8 popular devices (iPhone, MacBook, 4K monitor, iPad, and more). Once calculated, the DPI flows directly into the main converter for instant context-correct conversions.

03

100% Private & Instant

All calculations happen entirely within your browser — no data is ever sent to a server, no account is required, and the tool works fully offline. Conversions are instantaneous as you type (real-time), with no need to click a button for every calculation in most modes.

04

Live CSS Snippet Generator

The CSS Reference tab includes a live code generator — enter a centimetre value, select a CSS property and DPI, and instantly receive ready-to-use CSS code in all units (px, cm, mm, em, rem, pt). Copy the complete snippet with one click and paste directly into your stylesheet. No more manual calculation for CSS properties.

Pro Tips for Using the CM to Pixel Converter Effectively

💡
Always verify your target DPI before converting for print or export

The most common mistake is converting at the wrong DPI. Web design uses 96 DPI; standard print uses 300 DPI; older Mac conventions use 72 DPI. Use the DPI Calculator tab to measure your exact display DPI before starting a project — or use the Device Presets to instantly apply the correct DPI for your target device without guessing.

🔍
Use rem units for typography instead of px when building responsive layouts

When converting a centimetre font size specification to CSS, prefer the rem value over the px value. rem scales with the user's root font size setting, making your typography accessible and zoom-friendly. The converter shows both px and rem equivalents simultaneously — check the rem column for any font-size conversion before pasting into your CSS.

📋
Download the Bulk Table as a CSV for project-specific reference

For any project with a specific DPI target (e.g., a digital kiosk at 120 DPI, or a print brochure at 300 DPI), configure the Bulk Table tab with your project's DPI, set the range to cover your typical measurement values, and download the CSV. Open it in Excel or Google Sheets and pin it as a reference for the entire project — no more re-running individual conversions for common measurements.

📦
Use the Reverse Converter when inspecting browser-rendered element sizes

Browser DevTools report element sizes in pixels. When you need to verify that a rendered element matches a physical size specification (e.g., "this button must be at least 1.2 cm tall on screen"), use the Reverse Converter — enter the pixel height from DevTools and your screen DPI to get the physical centimetre measurement. This workflow is particularly useful for accessibility testing of touch target sizes.

Frequently Asked Questions

Conclusion

The relationship between centimeters and pixels is deceptively simple on the surface — divide by 2.54, multiply by DPI — but in practice it underpins some of the most important decisions in design, print production, and web development. Whether you're translating a brand guideline's physical measurements into CSS values, sizing images correctly for print at 300 DPI, or verifying that a UI element meets minimum touch target size requirements in centimeters, having a reliable, multi-unit converter saves time, prevents errors, and deepens your understanding of the measurement systems you work with every day.

Ready to Convert Your Measurements?

Use our free CM to Pixel Converter now — instant results in 8 units, DPI calculator, bulk table, and CSS code generator!