.png

What is a .png file?

Portable Network Graphics · Image · PNG Development Group / W3C · 1996

PNG is the go-to format for lossless images with transparency: logos, icons, screenshots and web graphics. It never degrades when saved, and it reads on virtually every device, which makes it the safe default when quality matters more than file size.

Category
Image
MIME type
Type
Binary
Is a .png file safe to open? Safe. PNG is a static image and cannot carry executable code.

What is a .png file used for?

PNG uses lossless compression, so re-saving it never adds artefacts. That makes it ideal for text, sharp edges, screenshots and anything with a transparent background.

It supports full alpha transparency and a wide range of colour depths. What it does not do well is photographs, where its files get large compared with JPEG or WebP.

PNG is one of the most universally supported formats in existence, opening in browsers, office apps, editors and operating systems without any plugin.

What opens a .png file?

The .png format opens in the following apps, grouped by operating system. If one app does not work, try another from the same list.

Windows

  • Photos
  • Paint
  • any browser
  • any editor

macOS

  • Preview
  • Photos
  • any browser

Linux

  • Image Viewer
  • GIMP
  • any browser

Web

  • Every browser

Open a .png file step by step

  1. Confirm the file really is a .png. Drop it into the WhatFileType identifier, which reads its signature in your browser without uploading anything.
  2. On Windows, open it with Photos or Paint.
  3. On Mac, use Preview or Photos.
  4. On Linux, try Image Viewer or GIMP.
  5. Still stuck? Convert the .png to JPG, which opens more widely.

Why can't I open my .png file?

Almost always because no installed app understands PNG. Install one of the apps above, or convert the file to a format your existing software already reads. If double-clicking opens the wrong program instead of nothing at all, the file association is set to the wrong app rather than the file being broken.

The other possibility is that the file is not really a .png at all. Drop it into the file identifier to check it by its bytes instead of its name. Nothing is uploaded.

How to convert a .png file

You can convert a .png file to JPG, WebP, AVIF, GIF.

Almost any viewer exports PNG. Going to JPG drops the alpha channel and adds lossy artefacts, so only do it when file size matters more than the transparency.

Convert images free: ImageConvert

What is the .png file signature (magic bytes)?

A .png file starts with the hex bytes 89 50 4E 47 0D 0A 1A 0A, which read as .PNG.... in ASCII. Programs identify PNG by those bytes, not by the filename, so a renamed file still gives itself away.

These are the documented signatures for PNG. For a full breakdown, see the PNG file signature page.

Documented magic-byte signatures for the .png format
Hex signatureOffsetASCIINote
89 50 4E 47 0D 0A 1A 0A0.PNG....PNG signature

See the full magic-numbers reference for every format.

Frequently asked questions

What is a .png file?

PNG is the go-to format for lossless images with transparency: logos, icons, screenshots and web graphics. It never degrades when saved, and it reads on virtually every device, which makes it the safe default when quality matters more than file size.

When should I use PNG instead of JPG?

Use PNG for logos, icons, screenshots, text and anything needing a transparent background. Use JPG for photographs where smaller files matter.

Why is my PNG so large?

PNG is lossless, so photos with millions of colours produce big files. For photos, JPG, WebP or AVIF will be far smaller.

Comparisons

Related formats

Sources

Details on this page were checked against authoritative references. How sources are ranked and what is deliberately left out is set out in the methodology.