PDF to JPG or PDF to PNG: Which Should You Use?
Converting a PDF page to an image seems like it should have one obvious answer, but the two common formats, JPG and PNG, compress an image in fundamentally different ways. For photos the difference barely matters. For a page full of text or fine lines, it changes what the result actually looks like.
CocoPDF offers both a PDF to JPG and a PDF to PNG tool for exactly this reason. The right choice depends on what is on the page.
How the two formats differ
PNG is lossless: every pixel is preserved exactly as rendered, with no approximation. JPG is lossy: it compresses the image in small blocks, discarding detail the algorithm judges to be less visually important in order to shrink the file. On a photograph with smooth gradients and natural noise, that trade-off is nearly invisible. On sharp, high-contrast content such as black text on a white background, JPG's block-based compression can introduce faint blur or "ringing" around letter edges, especially at lower quality settings.
The reason comes down to what each format was designed for. JPG was built for photographs, where neighbouring pixels usually differ only slightly and the eye forgives small errors in fine detail. It works in 8 by 8 pixel blocks and throws away the high-frequency information inside each one. A photograph has very little high-frequency information, so almost nothing is lost. The edge of a letter is nothing but high-frequency information, which is precisely the part JPG discards.
PNG takes the opposite approach. It compresses by finding repetition, which is abundant in a page of text: the same white background repeated thousands of times, the same black at every letter edge. That makes PNG both smaller and sharper than JPG on text, which is the one case where you genuinely do not have to trade quality for size.
When JPG is the right choice
- The PDF page is a photo, scanned image, or contains rich color illustrations.
- File size matters more than pixel-perfect sharpness, such as sharing on social media, embedding in a web page, or emailing.
- You are converting many pages and want a smaller total download.
- The image is going somewhere that only accepts JPG, which is still true of some upload forms and older systems.
When PNG is the right choice
- The page is mostly text, a technical diagram, or a chart with fine lines and small labels.
- You plan to zoom in on the image, or reprocess it further, for example running OCR on it.
- You need a transparent background. PNG supports transparency, JPG does not.
- The image is an intermediate step rather than the final output, since each JPG save discards a little more detail.
- The page contains a screenshot, a logo, or anything with large flat areas of a single color, where JPG tends to produce visible mottling.
The mixed page problem
Real documents rarely fall neatly into one camp. A report page with a photograph, a chart, and two paragraphs of text is exactly the case where the formats disagree: JPG will handle the photo well and soften the text, PNG will keep the text crisp and produce a much larger file because of the photo.
A useful way to decide is to ask what someone will do with the image. If they will read it, favour PNG, because unreadable text is a failure while a slightly larger file is an inconvenience. If they will glance at it, favour JPG. If the page is mostly photograph with a caption, JPG at a high quality setting is usually the better compromise, since the text at caption size is large enough to survive.
Resolution matters more than format
People often blame the format for a problem that is really about resolution. A page rendered at 72 DPI will look soft as a PNG and soft as a JPG, because the detail was never captured in the first place. Format determines how faithfully the pixels are stored. Resolution determines how many pixels there are to store.
For reading on screen, 150 DPI is comfortable. For printing, 300 DPI is the usual target. For running OCR afterwards, 300 DPI gives noticeably better recognition than 150, and it is worth the larger file because the image is a working file rather than something you keep. If your converted image looks disappointing, check the resolution before you switch formats.
What about the file size difference?
As a rough guide, a text-heavy page comes out smaller as a PNG than as a JPG, sometimes considerably. A photographic page comes out several times larger as a PNG. This surprises people who have learned the shorthand that "PNG is the big one", which holds for photos and reverses for documents.
If you convert a multi-page document and the total is unwieldy, the answer is usually not to switch format but to reconsider the job. Converting an entire PDF to images to email it is nearly always worse than sending the PDF, or compressing the PDF instead. Page images are for when you need an image, such as a slide, a web page, or a thumbnail.
How CocoPDF renders each page
The PDF to JPG tool renders each page at 150 DPI, sharp enough for screen use and typical print sizes, with an adjustable quality slider from 70 to 85% for web use up to 90 to 100% for archiving or printing. Every page becomes its own file. Single-page PDFs download directly, and multi-page PDFs are bundled into a ZIP. The PDF to PNG tool uses the same page-by-page approach without the lossy compression step.
On the quality slider, the useful range is narrower than it looks. Below about 70% the block artifacts become obvious on any page with text. Above about 95% the file grows quickly for improvements almost nobody can see. If you are unsure, 85% is a sound default, and if the page is mostly text you are better off switching to PNG than pushing the slider to 100%.
If you are not sure which you need: default to JPG for anything photo-like or where file size matters, and reach for PNG the moment small text or fine detail needs to stay sharp. Upload your file to the PDF to JPG tool, or PDF to PNG for the lossless version, and the conversion downloads in seconds.
Try it yourself
Everything in this article is free to use on CocoPDF, with no account needed.
๐ผ๏ธ PDF to JPGRelated Guides
How to Compress a PDF Without Losing Quality
Learn the difference between screen, ebook, printer, and prepress compression settings and when to use each.
How to Scan a Document to PDF With Just Your Phone
How phone-camera scanning gets a flatbed-scanner result, using edge detection, perspective correction, and the filter that matters most.