Portable Network Graphics · .png
The PNG format
Lossless, with a genuine alpha channel. The correct home for screenshots, logos, UI and anything with hard edges you cannot afford to soften.
PNG makes the opposite bargain to JPEG: it never discards a pixel value. Every save returns exactly the image you put in, transparency included. You pay for that in file size on photographs, and get it back many times over on anything with flat colour and crisp edges.
The format itself
What PNG actually is
PNG arrived in 1996 as a deliberate, patent-free replacement for GIF, whose LZW compression was encumbered at the time. The design brief was pointed: lossless compression anyone could implement freely, proper transparency instead of GIF’s single fully-transparent colour, and support for far more than 256 colours.
Compression happens in two stages. First each row of pixels passes through a prediction filter chosen per scanline, which rewrites each byte as its difference from a neighbour above or to the left. On smooth gradients and flat regions those differences collapse toward zero. The filtered data then goes through DEFLATE, the same general-purpose algorithm used in ZIP. Nothing is approximated at either stage, so decoding reproduces the original bytes exactly.
The format supports 8 or 16 bits per channel, palette-indexed and greyscale modes, and a full alpha channel giving every pixel its own level of opacity — which is what lets an antialiased logo sit cleanly on any background colour instead of carrying a halo. What PNG has no concept of is animation or multiple pages: one file, one still image.
Where it is the right answer
Common uses
- 01
Screenshots, where every pixel of rendered text must stay exactly as captured
- 02
Logos, icons and UI assets that need a transparent background and clean antialiased edges
- 03
Diagrams, charts and line art built from flat colour and sharp boundaries
- 04
Images destined for repeated editing, since re-saving costs nothing in quality
- 05
Page renders from documents where legibility of small type is the point
- 06
Graphics composited over unknown or changing backgrounds, using the alpha channel
Both sides
What PNG does well, and where it stops.
Strengths
- Truly lossless: what you save is what you get back, however many times you re-save it
- Full per-pixel alpha transparency, not a single keyed-out colour
- Exceptionally efficient on flat colour, text and line art — often far smaller than a JPEG of the same screenshot, and sharper
- 16-bit-per-channel support for work that needs tonal headroom
- Openly specified, unencumbered and supported everywhere, including every current browser
Limitations
- Inefficient for photographs. A continuous-tone photo stored as PNG is commonly several times the size of a visually equivalent JPEG.
- No animation and no multi-page support — for animation you need a format built for it, such as WebP.
- No CMYK. PNG is an RGB format, so it is not the right hand-off for commercial print workflows.
- Large photographic PNGs are slower to encode and decode than equivalent JPEGs, and heavier on memory.
- Metadata support is thinner in practice than JPEG’s Exif, so camera and orientation data often does not survive a conversion.
Specification
Technical detail
The facts worth knowing before choosing PNG for a job, rather than after.
- Full name
- Portable Network Graphics
- MIME type
- image/png
- Extension
- .png
- Introduced
- 1996, as a patent-free GIF replacement
- Compression
- Lossless DEFLATE with per-scanline prediction filters
- Bit depth
- 8 or 16 bits per channel
- Colour modes
- Truecolour, palette-indexed, greyscale, each with optional alpha
- Transparency
- Full alpha channel
- Animation
- Not supported
Tools that apply
Converting PNG in your browser
Each listed MyPDFilles conversion runs on your device: the file is read from your disk, converted in the tab and handed back as a download. Educational references to external software are not covered by that claim.
- PNG to PDF
PNG to PDF
Convert PNG screenshots, diagrams and logos to PDF without softening a single edge.
- Images to PDF
Images to PDF
Drop a mixed pile of JPG, PNG, WebP and BMP files and get one coherent PDF.
- PDF to PNG
PDF to PNG
Render PDF pages as white-background PNG images with lossless pixel encoding.
Questions about PNG
Should I use PNG or JPEG for a photograph?
JPEG, unless you are going to edit it repeatedly. Photographs are continuous-tone, which is the case JPEG was built for and the case PNG’s prediction filters handle worst — you get a much larger file for a difference almost nobody can see.
Why is my PNG screenshot larger than I expected?
Usually because the screen content is photographic or heavily gradient-filled, such as a desktop wallpaper behind the window. Prediction filters only compress well where neighbouring pixels are similar; noisy or richly shaded regions defeat them.
Does converting a JPEG to PNG restore quality?
No. PNG will faithfully preserve whatever the JPEG already contained, including its compression artefacts, in a bigger file. Lossless storage protects an image from future damage; it cannot undo past damage.
What does the alpha channel actually store?
An opacity value for every pixel, independent of its colour. That is why an antialiased edge can fade smoothly to nothing and still look correct on a dark background, a light one, or a photograph.
Useful background
Read the related guide or article
Compare with
Related formats
JPG
.jpgThe format photographs live in. Lossy block-based compression trades detail you are unlikely to notice for files small enough to send.
WebP
.webpA single modern format covering the jobs JPEG, PNG and animated GIF used to split between them — usually at a noticeably smaller size.
PDF
.pdfA fixed-layout page description format: the page you author is the page everyone sees. Open-standard since 2008, and the reason it is everywhere.
TIFF
.tifNot one encoding but a container that can hold many. The long-standing standard in scanning, fax and prepress, and unreadable in a browser.