<span aria-hidden="true" id="what-is-a-png-file-everything-you-need-to-know-about-the-png-format"></span>

# What is a PNG file? Everything you need to know about the PNG format

A **PNG file** is a losslessly compressed raster image in the Portable Network Graphics format. PNG preserves exact pixel values and supports full alpha transparency, making it a common choice for screenshots, logos, diagrams, and interface assets.

<span aria-hidden="true" id="how-does-png-work"></span>

## How does PNG work?

PNG predicts each pixel from nearby pixels and stores the difference. It then compresses that data with the DEFLATE algorithm. Decompression reconstructs the original pixels exactly; there is no quality slider and no generational loss.

PNG supports grayscale, indexed color, true color, and alpha channels. It can also use interlacing to show a rough version while data arrives. Standard PNG does not provide the frame-based animation associated with GIF, although APNG extends the format for animation.

<span aria-hidden="true" id="benefits-of-png"></span>

## Benefits of PNG

* **Lossless storage:** decoding reproduces the encoded pixels exactly.
* **Alpha transparency:** supports smooth, partially transparent edges.
* **Sharp graphics:** preserves text, lines, diagrams, and interface screenshots.
* **Broad compatibility:** supported by browsers, editors, and operating systems.

<span aria-hidden="true" id="limitations-of-png"></span>

## Limitations of PNG

Photographs usually become much larger as PNG than as JPEG, WebP, or AVIF because PNG does not remove visual detail. Camera metadata support is less central to typical PNG workflows, and complex images can be expensive to transfer at full resolution.

Choose PNG for exact graphics and transparency. Choose JPEG for universally compatible photos, or WebP/AVIF for smaller modern-web assets.

<span aria-hidden="true" id="png-compared-with-jpeg-and-webp"></span>

## PNG compared with JPEG and WebP

|Format|Best fit|Compression|Transparency|
|-|-|-|-|
|PNG|Screenshots, logos, diagrams|Lossless|Full alpha|
|JPEG|Photographs|Lossy|No|
|WebP|Mixed modern-web imagery|Lossy or lossless|Full alpha|

<span aria-hidden="true" id="how-to-resize-and-optimize-png-files-with-transloadit"></span>

## How to resize and optimize PNG files with Transloadit

Use [🤖/image/resize](/docs/robots/image-resize.md) to normalize dimensions, then[🤖/image/optimize](/docs/robots/image-optimize.md) to reduce the file without changing its dimensions:

```json
{
  "steps": {
    ":original": { "robot": "/upload/handle" },
    "png": {
      "use": ":original",
      "robot": "/image/resize",
      "format": "png",
      "width": 1200,
      "resize_strategy": "fit"
    },
    "optimized": {
      "use": "png",
      "robot": "/image/optimize"
    }
  }
}

```

<span aria-hidden="true" id="png-faq"></span>

## PNG FAQ

<span aria-hidden="true" id="what-does-png-stand-for"></span>

### What does PNG stand for?

PNG stands for Portable Network Graphics.

<span aria-hidden="true" id="is-png-always-better-quality-than-jpeg"></span>

### Is PNG always better quality than JPEG?

PNG preserves its encoded pixels exactly, but that does not automatically make it the best format. A well-encoded JPEG can look excellent at a fraction of the size for photographs.

<span aria-hidden="true" id="does-png-support-transparent-backgrounds"></span>

### Does PNG support transparent backgrounds?

Yes. PNG supports an alpha channel with fully and partially transparent pixels.

<span aria-hidden="true" id="related-demos"></span>

## Related demos

* [Convert PNG to WebP](/demos/image-processing/convert-an-image-from-png-to-webp.md)
* [Convert PNG to JPEG](/demos/image-processing/convert-an-image-from-png-to-jpg.md)
* [Remove an image background](/demos/image-processing/remove-image-background.md)
