# 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.

## 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.

## 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.

## 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.

## 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|

## How to resize and optimize PNG files with Transloadit

Use [🤖/image/resize](/de/docs/robots/image-resize.md) to normalize dimensions, then[🤖/image/optimize](/de/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"
    }
  }
}

```

## PNG FAQ

### What does PNG stand for?

PNG stands for Portable Network Graphics.

### 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.

### Does PNG support transparent backgrounds?

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

## Related demos

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