By Tim King · Updated
Extract Images From PDF
Save Images From a PDF as Original JPEGs or Lossless PNGs, Zipped
OneTask is free, with no sign-up, and built by one person.
If this tool saved you time, a coffee helps keep new ones coming.
How the Extract Images From PDF works
Extract images from PDF files exactly as they were embedded, with no screenshots or re-rendering. Drop the file in and download a zip of every picture: photos come out as their original JPEG bytes and everything else as lossless PNG. Nothing is uploaded; the PDF is read in your browser.
A PDF does not store a page as one picture. Text, vector drawings and images are separate objects, and each photo or scan inside the file is kept as its own image stream with a width, a height, a colour space and a compression filter. Extracting those streams gets you the pictures at the exact resolution they were placed in the document, which is usually far sharper than a screenshot.
How to extract images from PDF files here
The tool opens the PDF with pdf-lib and walks every object in the file, not just the ones on visible pages, and picks out each image stream. What happens next depends on how the image was compressed:
| Stored as | Saved as | Quality |
|---|---|---|
| DCTDecode (JPEG) | .jpg, original bytes | Identical to the embedded file |
| JPXDecode (JPEG 2000) | .jp2, original bytes | Identical to the embedded file |
| Flate, LZW or uncompressed | .png | Lossless, pixel for pixel |
| CCITT fax or JBIG2 | skipped and counted | Not converted |
JPEGs are copied byte for byte, so there is no second round of compression and no quality loss. Other images are decoded to raw pixels, converted from their colour space to RGB and written as PNG. Grey, RGB, CMYK, ICC-based and indexed (palette) images are all handled, at 1, 2, 4, 8 or 16 bits per channel. If an image has a soft mask, the mask becomes the PNG's transparency, so a logo with a transparent background keeps it.
One image comes back as a single file. Two or more are packed into a zip named after the PDF, with files numbered in the order they appear in the file's object table.
Real uses
- Recovering photos from a report or brochure when the original image files are lost.
- Reusing a logo or chart that was supplied only inside a PDF.
- Checking image resolution before printing: the extracted pixel size tells you how much detail is really there, regardless of how large it is drawn on the page.
- Pulling scanned pages out of a scanner's PDF as plain image files for editing.
- Auditing what a file contains. Hidden or off-page images are found too, which matters before you share a document that was edited from someone else's template.
Tips and pitfalls
Vector graphics are not images. Charts made in Excel, diagrams from design tools and most text are drawn with vector instructions, so they are not extracted. To capture those, take a screenshot of the page at a high zoom level instead.
Small images are often decoration. Bullets, icons, rules and tiny gradient tiles are images too. The default setting skips anything under 50 pixels on its shorter side; choose Keep every image if you need them.
Duplicates are stored once. A logo repeated on every page is usually one object in the PDF, so it is extracted once, which is what you want.
CMYK conversion is approximate. Print-ready PDFs often hold CMYK images. They are converted to RGB with a simple formula rather than a colour profile, so strong colours may look slightly different from the printed result. JPEG CMYK images are copied as is and keep their original data.
Masked and stencil images. Images used only as transparency masks are not saved on their own, and one-bit stencil masks, which a PDF fills with a colour, are skipped because they hold no colour of their own.
Fax and JBIG2 scans. Some scanners store black-and-white pages with CCITT or JBIG2 compression. Browsers cannot decode these, so they are counted in the note instead of being saved.
How to read the result
The stats show how many images the PDF holds, how many were saved, how many were original JPEGs and how many were written as PNG, how many were skipped for being small, and the download size. A note lists any images in formats that could not be converted. If the count is lower than you expect, the missing pictures are probably vector drawings, not images.
FAQ
Does extracting images from a PDF reduce their quality?
No. JPEG images are copied byte for byte from the file, and every other image is saved as lossless PNG. You get exactly the pixels stored in the PDF, which may be more than what you see on screen.
Why are some pictures missing from the zip?
They are probably vector graphics, such as charts and diagrams, which are drawn with lines and shapes rather than stored as images. Fax and JBIG2 scans are also skipped. A high-zoom screenshot of the page captures those.
Can it extract images from a password-protected PDF?
No. An encrypted PDF, including one that opens freely but restricts copying or printing, stores its images scrambled, and the tool will say so instead of saving unreadable files. Remove the protection first, then extract the images.
Is my PDF uploaded anywhere?
No. The file is read by your browser on your own device, and the zip is built there too. Nothing is sent to a server, so confidential documents stay private.
See also: all PDF tools, Images, Audio, Video & Screen, SVG, Simulations & Screensavers, Generative Art, Chart Makers, 3D Model Viewers, Drawing Pads, Mockups & 3D Making, Diagram Makers, 3D Science, Tracker Music.
Related tools
PDF Text Extractor
Extract the text layer from a PDF, privately, in your browser.
PDF Page Extractor
Save single PDF pages as a new file in your browser: nothing uploaded.
PDF Metadata Remover
Strip author, dates and hidden XMP metadata from a PDF privately.
Compress To KB
Hit an exact kB limit by searching for the right quality.
Image Dimensions Inspector
Pixel size, aspect ratio, megapixels and CSS size for any image.