PNG, JPG, or WebP? Choosing the Right Format for Text Images
July 2026 • 9 min read
Most format advice online is written for photographs, which is why it gives you the wrong answer for text. An image full of sharp letter edges behaves almost exactly opposite to a photo of a sunset, and picking the format by habit is how you end up with muddy, grey-fringed lettering.
The one distinction that decides everything
Every image format is either lossless or lossy. Lossless means the pixels you get back are bit-for-bit the pixels you put in. Lossy means the encoder is allowed to throw information away to make the file smaller, and it decides what to discard based on assumptions about what human eyes ignore.
Those assumptions were built around photographs. Photos are full of gradual tonal shifts, so a lossy encoder can smooth out fine detail and nobody notices. Text is the opposite: it is defined almost entirely by hard, high-contrast edges. Every single letter is a boundary between two very different colours, and edges are precisely what lossy compression handles worst.
Why JPG ruins text specifically
JPG compresses by splitting the image into 8×8 pixel blocks and describing each block as a sum of wave patterns, then discarding the subtlest waves. Reproducing a crisp black-to-white transition requires a lot of those subtle waves. Take them away and the encoder approximates the edge with a ripple instead of a clean step.
You see that ripple as ringing: faint grey or coloured ghosting that echoes outward from every letter, most visible against flat backgrounds. At small text sizes the ripples from neighbouring letters overlap and the whole line takes on a dirty haze. Zoom into any JPG screenshot of a document and you will find it immediately.
JPG makes this worse by storing colour at half resolution in each direction (chroma subsampling). Coloured text on a coloured background — red on white, white on blue — gets its edges smeared before block compression even begins. This is why red text is the classic worst case for JPG.
The damage compounds. JPG is lossy every time it is saved. If you screenshot a JPG, crop it, and save again, you are compressing artefacts that are already there. Text images often get re-saved many times as they move between apps, and each round trip degrades them further. Lossless formats have no such generational loss.
Why PNG is the sane default for text
PNG is lossless, so a black letter stays exactly black and the pixel beside it stays exactly white. But the more interesting property is why PNG files stay small for this kind of image.
PNG compresses by finding repetition. A text image is mostly one flat background colour, which is about the most repetitive data possible, so it collapses dramatically. A 1200×600 PNG of a quote on a solid background often lands under 30 KB. The same image as a photograph would be hundreds of kilobytes.
This produces a result that surprises people: for text images, the lossless format is frequently the smaller file. The usual trade-off simply does not apply. PNG only becomes bulky when you feed it photographic content, where there is little repetition to exploit.
PNG also supports a full alpha channel, which is what lets you export text with a genuinely transparent background for overlays and watermarks. JPG has no concept of transparency at all — it will fill it with white or black.
Where WebP actually wins
WebP is often described as simply better than both, which oversells it. WebP has two separate modes and they behave very differently:
- Lossy WebP is a modernised JPG. It handles edges noticeably better than JPG and supports transparency, but it is still throwing information away and still softens fine lettering.
- Lossless WebP is a modernised PNG, and it genuinely does beat PNG on size — typically 20–30% smaller for the same exact pixels, sometimes more on flat graphics.
So the honest summary is: lossless WebP is the technically superior choice for text images, and PNG is the choice that works everywhere. If you are publishing to your own website and control the pipeline, lossless WebP saves real bandwidth. If the file is going to be pasted into a chat app, dropped into a slide deck, emailed to a colleague, or opened by someone on an older system, PNG will not make you troubleshoot anything.
A decision table you can actually use
| What the image contains | Use | Why |
|---|---|---|
| Text on a solid background | PNG | Crisp edges, and usually the smaller file anyway |
| Text needing transparency | PNG | Full alpha channel; JPG cannot do it at all |
| Screenshots of UI or documents | PNG | Full of text and flat panels — worst case for JPG |
| Text images for your own site | Lossless WebP | Same pixels as PNG, 20–30% less bandwidth |
| A photo with a caption burned in | High-quality JPG or lossy WebP | Photo content dominates; keep quality ≥ 85 |
| Anything being archived or re-edited | PNG | No generational loss across repeated saves |
Formats worth mentioning briefly
GIF is lossless but capped at 256 colours. For plain two-colour text it technically works, and it fails as soon as you use anti-aliased edges or a gradient background, since those need far more than 256 shades. Its transparency is also binary — a pixel is fully opaque or fully invisible — which produces jagged letter edges. There is no reason to choose it over PNG today.
SVG is the genuinely best option when it fits, because it stores the text as vector instructions rather than pixels, so it stays razor sharp at any size and the file is tiny. The catch is that it only renders correctly where the font is available, and many platforms — most social networks among them — will not accept an SVG upload at all. That is exactly why rasterising to PNG remains the practical route for social graphics.
AVIF compresses better than WebP but is slower to encode and its lossless mode is less consistently supported. For text specifically, lossless WebP is the better-supported pick right now.
Three mistakes worth avoiding
Converting a JPG to PNG to "fix" it. Once compression artefacts are baked into the pixels, they are part of the image. PNG will faithfully preserve the damage. Always re-export from the original source instead.
Exporting text at display size. Whatever the format, generate at roughly twice the size you intend to display, so it stays sharp on high-density screens. Downscaling looks fine; upscaling never does.
Assuming the platform keeps your format. Most social networks re-encode every upload to their own lossy format regardless of what you send. You cannot prevent that, but uploading a clean lossless original means their encoder starts from undamaged pixels rather than compressing artefacts twice.
Try it yourself
The clearest way to understand any of this is to see it. Generate the same line of text twice with our Text to Image Converter, save one copy as PNG, run the other through any JPG compressor at moderate quality, then zoom both to 400%. The grey haze around the letters in the JPG version is the entire argument, visible in about ten seconds.
