Pixel Converter
Find out how many pixels a print size needs, how large a picture prints at a given DPI, or what a file size is in KB, MB or GB. Type a number, pick the units, and read the result.
Unit Converter
No file leaves your device; you only download the generated code.
Pixels per inch used to turn pixels into cm, mm or inches. 96 is the screen/CSS standard; use 300 for photos and print, or the DPI a form specifies. At 300 DPI, 1 cm = 118 px.
Windows and most upload forms count 1 KB = 1024 bytes (1 MB = 1024 KB). macOS and disk makers use 1000. The difference is about 5% at MB size.
How many digits to show after the decimal point in the result.
Also shows the matching other side at this ratio, e.g. 1920 px wide at 16:9 is 1080 px tall.
First number of the ratio, e.g. 5 for 5:7.
Second number of the ratio, e.g. 7 for 5:7.
Files are deleted 30 minutes after processingPrivacy policy
Popular conversions
px to cm
px to cm
Turn pixel values into centimeters at screen or print resolution.
96
CSS pixels in one inch, the basis browsers use for every length on a web page.
Defined in the W3C's CSS Values and Units specification: 1in = 2.54cm = 96px. It is also the default Pixel density here.
Pixels and print size at 300 DPI
| Size | Centimeters | Millimeters | Pixels at 300 dpi | Long edge |
|---|---|---|---|---|
| 1 in | 2.54 | 25.4 | 300 | |
| 2 in | 5.08 | 50.8 | 600 | |
| 4 in | 10.16 | 101.6 | 1200 | |
| 5 in | 12.7 | 127 | 1500 | |
| 6 in | 15.24 | 152.4 | 1800 | |
| 8 in | 20.32 | 203.2 | 2400 |
A pixel has no physical size until you decide how many of them fit into an inch. That number is the density, written as DPI (dots per inch) or PPI (pixels per inch); for converting sizes the two mean the same thing. The formula is short: pixels = inches × DPI, and inches = pixels ÷ DPI. Centimeters follow from the exact definition of the inch as 2.54 cm, published by NIST, and millimeters are ten times that.
The chart uses 300 DPI because it is the usual starting point for photo and document printing. At that density a print 6 inches wide needs 1,800 pixels across, and every inch more adds another 300. If a picture does not have enough pixels for the size you want, it can still be printed, but each pixel becomes larger and edges start to look soft. Converting the other way tells you the largest size a picture can print at before that happens: divide its width in pixels by 300 to get inches.
Camera resolution in megapixels is the same idea seen from the other end. Multiply the width by the height in pixels and divide by a million to get megapixels; to see how large a photo prints, convert each side separately at your DPI. A camera's megapixel number says nothing about the shape of the frame, so always work from the two sides rather than the total.
Print shops add one more detail: bleed. Artwork that runs to the edge of the paper is usually made a few millimeters larger on every side and trimmed after printing. Ask for the shop's bleed value, add it to the trimmed size in millimeters, and convert the total to pixels so the extra margin is covered at full resolution.
Screens work differently. A web page measures everything in CSS pixels, at 96 to the inch by definition, and phones and high-resolution monitors then draw each CSS pixel with two, three or more physical pixels. That is why an image for a sharp display is often made at twice the size it is shown at. For screen work, leave Pixel density at 96; for print, set it to the printer's DPI.
Official photo and document rules are often written in millimeters, while upload forms check pixels. Converting the stated size at the DPI the rule gives, or at 300 when it gives none, tells you the pixel dimensions to aim for before you crop. The passport photo maker applies those sizes for many countries directly, so the conversion here is most useful for forms and print jobs that it does not cover.
Exact conversion factors
Points are the unit of type and page layout. Word processors, design apps and PDF files measure font sizes and margins in them, and CSS defines one point as exactly 1/72 of an inch. Converting points to pixels therefore depends on DPI as well: at 96 DPI, 12 pt text is 16 pixels tall, the same as the default font size in most browsers.
File sizes are a separate problem with the same kind of confusion. In the metric system a kilobyte is 1000 bytes and a megabyte a million. Computers work in powers of two, so 1024 bytes became a common meaning of a kilobyte as well. The binary prefixes kibi, mebi and gibi, listed by NIST, were introduced to tell the two apart, but most software still writes KB and MB for both. Windows File Explorer reports sizes in steps of 1024, while macOS and the capacity printed on drives and phones use steps of 1000, as Apple explains.
The gap is small at first and grows with each step: a kilobyte differs by 2.4 percent, a gigabyte by a little over 7 percent, and a terabyte by almost 10 percent. That is the whole reason a new drive seems to have less space than its label promises. When an upload form says a file must be under a limit in KB or MB, it may count either way and rarely says which, so leave a small margin below the limit.
Getting sizes right
Do
- Start from the final print size and DPI, then work out the pixels you need.
- Use Keep aspect ratio so the second side matches, for example a 4:5 portrait post or a 16:9 video frame.
- Check which byte base an upload form uses when a file is close to its limit.
Avoid
- Raising the DPI number in a file and expecting more detail; the pixel count stays the same.
- Using 72 DPI for print sizes; it gives prints that are far too large and soft.
- Rounding early in a chain of conversions. Set Decimal places higher and round the final value only.
DPI, PPI and what printers mean
- DPI
- Also called PPI · dots per inch · pixels per inch
- The number of pixels placed in each inch when a digital picture is printed or measured. Strictly, PPI describes the image and DPI the ink dots a printer lays down, but for converting pixels to physical size the two are used the same way.
A picture file often carries a DPI value in its metadata, such as 72 or 300, but it is only a label. Changing it does not add or remove pixels; it only changes how large some programs, such as word processors, place the picture by default. A form that asks for a photo at 300 DPI really wants enough pixels for the stated print size at that density, which is what this converter helps you work out.
Keep aspect ratio adds the second side for you. Choose a ratio such as 16:9 for video and presentations, 9:16 for vertical clips, 4:5 for a portrait social post, 3:2 for camera photos or 1:1 for a square, then enter one side; the other is worked out from the ratio. Custom takes any pair of numbers, for example the width and height of an existing picture, so you can scale it to a new size without distorting it. Decimal places controls rounding of every result; pixel counts are whole numbers in practice, so round those at the end, while centimeters and inches usually need one or two decimals.
Once you know the pixel size you need, the rest is a quick job with other tools. Resize Image scales a picture to exact pixel dimensions, the Compress Image tool brings the file under a KB or MB limit, and the QR code generator asks for an image size in pixels that you can work out here from the print size of the code. For plans and drawings, the CAD converter sets the resolution of PNG and JPG output in DPI as well.
How to convert pixels to cm or inches
Enter the value
Type the number under Value, then choose its unit in From and the unit you want in To.
Set the basis
For pixels, set Pixel density to the DPI you will print or display at. For file sizes, choose whether 1 KB equals 1024 or 1000 bytes.
Read the result
Press the convert button. Use Keep aspect ratio to get the matching second side for a 16:9, 4:5 or custom shape.
Pixel converter questions
How many pixels make up one centimeter?
It depends on the density. At 96 DPI, the CSS standard for screens, one centimeter is about 37.8 pixels; at 300 DPI, common for print, it is about 118. Set Pixel density to the one you need.
Which DPI suits a printed photo or document?
300 DPI is the usual target for photos and documents viewed up close. Posters and banners seen from a distance can use less. Ask the printer if they publish a requirement.
Why is the default 96 DPI and not 72?
Web browsers define one CSS inch as exactly 96 CSS pixels, so 96 is the right basis for anything measured in a style sheet. The old 72 figure comes from early Mac screens and survives as the number of points in an inch.
Is 1 MB 1000 KB or 1024 KB?
Both are in use. Windows counts in steps of 1024, while macOS and storage makers count in steps of 1000. Pick the matching option in 1 KB equals to match the system you are checking against.
Does changing the DPI make a picture sharper?
No. DPI only says how many pixels go into each inch on paper. The picture has the same pixels either way; it just prints smaller at a higher DPI and larger at a lower one.
How do I make a picture a certain size in centimeters?
Convert the centimeters to pixels here at your print DPI, then resize the picture to that pixel size with the Resize Image tool.
Do I need to upload anything?
No. This tool only works with the numbers you type; there is no file to add.
From the blog
Photo & Size Requirements · 10 min read
What "Passport Size Photo" Means When a Form Gives No Size
A form says "passport size photo" and nothing else. Here is what the phrase usually means by region, the clues a form gives away, and how to turn the size into pixels and KB.
Image Guides · 9 min read
Cropping to an Aspect Ratio: How Much of Your Photo Survives
Every ratio crop starts from the shape your camera recorded. Here is how much of a 4:3 or 3:2 photo each common ratio keeps, and when padding or a new shot is the better choice.