Skip to main content
PPDF123

Extract Images From a PDF

Extract Images pulls the embedded raster images out of a PDF and delivers them in a ZIP as PNG or JPEG files. Vector drawings and page text are not images and are not included.

Drag and drop files here, or click to choose

Accepts PDF · up to 500.0 MB per file · up to 20 files at once

You can also paste a file with Ctrl/Cmd+V, or from the clipboard menu.

Extract Images walks page XObject images, decodes Flate/ASCII85/DCT streams, and zips them as `image_N.png` or `image_N.jpeg`. The `format` field chooses png (default) or jpeg. Shared XObjects are extracted once.

LZW-filtered images return an internal error (`LZW images unsupported`). Pages without an XObject dict are skipped. A file with no extractable images still returns a ZIP, which may be empty of members you care about.

This is not rendering each page to a PNG (that is PDF to Images) and not OCR. Vector art is not an image XObject and will not appear.

Password-protected files are unlocked for you on this page once you enter the password; API callers run Unlock first.

What the format choice does depends on how the picture is stored in the PDF. If it is stored as JPEG data and you choose JPEG, the original bytes are copied into the ZIP without re-encoding, so you get the picture exactly as it was embedded. If it is JPEG data and you choose PNG, it is decoded and written as a PNG, which is lossless from that point but cannot restore detail the JPEG had already lost, and the file can be larger. If it is stored as plain pixel data, it is decoded and written in the format you chose; JPEG output in that case is encoded at quality 90.

Files are numbered `image_1`, `image_2` and so on in page order, with the extension of the chosen format. The numbers do not tell you which page an image came from, so identify pictures by looking at them. When the same image object is used on several pages, such as a logo in a header, it is written once.

Pictures are converted to 8-bit RGB. Grayscale pictures become gray RGB images. A PDF can also attach a separate soft mask that gives a picture its transparency; that mask is not applied, so a cut-out photo may come out with a solid background. A picture stored in a color model other than gray or RGB, for example CMYK, can come out with wrong colors because only the first three color values of each pixel are used.

If a single image in the file cannot be decoded, the whole request fails instead of skipping that image. The message mentions what went wrong; an LZW-compressed picture says LZW images are unsupported. When that happens, use PDF to Images to render the pages as pictures instead, or Remove Images if what you want is the document without its pictures.

A PDF with no embedded pictures still returns a ZIP, with no image files inside. A scanned document can store each page as a picture, in which case Extract Images returns those page scans; to turn scans into searchable text use OCR PDF, which can return a searchable PDF or Markdown.

Features

  • XObject images to a ZIP of PNG or JPEG
  • JPEG data chosen as JPEG is copied byte for byte, with no re-encoding
  • Other pictures are decoded to 8-bit RGB and written as PNG, or as JPEG at quality 90
  • Dedupes by object id; LZW unsupported
  • Files are numbered in page order as image_1, image_2 and so on
  • Not page rasterization and not OCR
  • Anonymous API at /api/v1/misc/extract-images

When to use this tool

  • Pull photos out of a born-digital report
  • Recover JPEG photo streams without re-encoding when format=jpeg
  • Avoid rasterizing whole pages when you only want the figures
  • Reuse a product photo from a catalogue PDF in a slide or a web page
  • Check which pictures a document embeds before deciding whether to strip them with Remove Images

How do I extract images from a PDF?

  1. Upload a PDF that embeds photos or raster figures, such as a scanned document, a brochure or a report with photographs.
  2. Choose JPEG if you want photographs saved as JPEG files without recompression, or keep PNG for graphics and screenshots.
  3. Click Process and download `{name}_extracted_images.zip`, then unzip it.
  4. Open the files and match them to the document by eye; the numbering follows page order but does not name the page.
  5. If the ZIP is empty or the request fails, read the message: a failure naming LZW means an image uses a compression that is not supported, and an empty ZIP means the PDF has no embedded pictures to pull out.

Limits and edge cases

  • Not a page renderer
  • LZW fails the job
  • PNG output is RGB, so transparency and soft masks are dropped
  • No OCR
  • File names carry the order of discovery, not the page number
  • One undecodable picture stops the whole job
  • Vector graphics and text are not extracted
  • Upload limit on this website: 500 MB per file, sent in chunks above about 95 MB. A single direct API request body is capped at 100 MB.

Examples

  • A PDF with three unique photo XObjects yields image_1 through image_3 in the ZIP
  • A vector logo page may contribute nothing
  • A brochure whose header logo repeats on all 8 pages and that has 2 photos yields 3 files, because the logo is one shared object that is written once
  • A text-only report returns a ZIP with no image files inside, and nothing is reported as an error

Privacy for this tool

Files are uploaded over HTTPS, processed in memory or a short-lived temporary directory on our servers, and deleted when your result is ready. We do not keep copies for later browsing, training, or advertising profiles. See the Privacy Policy for retention details and AdSense cookie disclosures.

Frequently asked questions

Why didn't I get one image per page?
Only embedded image XObjects are extracted. A page that is text plus vectors may have zero images.
How is this different from PDF to Images?
PDF to Images renders pages. Extract Images pulls existing image objects out of the file.
What about LZW?
Decoding LZW is unimplemented. The job errors instead of skipping that one image.
Are masks and SMask handled?
Treat output as best-effort pixel dumps. Soft masks and unusual color spaces can look wrong.
Do I get the original JPEG file or a re-compressed copy?
If the picture is stored in the PDF as JPEG data and you choose JPEG, you get those same bytes back with no re-encoding. Choose PNG and the picture is decoded and saved as a PNG instead. For pictures stored as raw pixel data there is no original JPEG, so a JPEG result is a fresh encode at quality 90.
Why do the images have numbers instead of page numbers?
The files are named image_1, image_2 and so on in page order, and an image used on several pages appears once. The name does not record the page, so open the files to see which is which.
My ZIP is empty. Does the PDF have no images?
An empty ZIP means the tool found no embedded picture objects on the pages. Text, lines and charts drawn as vectors are not pictures and are never extracted. If you want those as pictures, use PDF to Images to render the pages.
The request failed with a message about LZW. What now?
One picture in the file uses LZW compression, which this tool cannot decode, and the whole job stops rather than skipping it. Render the pages with PDF to Images, or remove the pictures with Remove Images.
Why does an extracted photo have the wrong colors?
Pictures are converted to 8-bit RGB using the first color values of each pixel. A picture stored in a color model other than gray or RGB, such as CMYK, can come out with shifted colors. A separate soft mask is not applied either.

Last updated:

Call this from code

Every tool on this site is a plain REST endpoint - no account or API key needed for anonymous use. Built for AI agents and developers as much as for browsers.

curl -X POST "https://pdf123.xyz/api/v1/misc/extract-images" \
  -F "[email protected]" \
  -F "format=png" \
  -o output.pdf

Also available as an MCP tool for agent clients that speak Model Context Protocol (JSON-RPC 2.0 over POST /mcp). Full API reference

Use it from an AI agent

Skill

Claude Code, Codex, Cursor and other AI agents can run Extract Images for you with this skill: /skills/pdf123-extract-images.md

All agent skills

Files are used only for this processing job and deleted automatically afterward.