Extract PDF Attachments

Extract PDF attachments from one PDF up to 50 MiB in your browser, without uploading it. Save embedded XML, spreadsheets and other recovered files individually, with a ZIP normally provided for multiple attachments. Page images and text are not attachments.

Drop files here or choose files
One PDF at a time · stays on your device · up to 50 MiB

Reads the files stored inside a PDF — document attachments and the paperclip ones on a page. Nothing is uploaded.

How to use

  1. Add the PDF: Drop the file onto the box or click to choose it. One PDF at a time, up to 50 MiB: if you drop several at once none of them is added and the message says how many were turned away. To swap files, remove the current one with ✕ first.
  2. Click Extract attachments: The PDF is read on your device. The page then says how many attachments it found and lists each one with its file name, size, and where it came from — Document attachment, or the page number of the paperclip it hangs on — plus any description the PDF stored with it.
  3. Save what you need: When more than one attachment comes out, the first result is normally a ZIP of all of them, and up to 20 single files follow it. Download saves one file; on a phone, Save to device opens the system share sheet when the browser offers file sharing and simply downloads the file when it doesn't.

What counts as a PDF attachment — and what doesn't

This tool extracts embedded files from one PDF up to 50 MiB locally in your browser. A PDF attachment is a whole, separate file carried inside the PDF: the spreadsheet an invoice was built from, the XML of an e-invoice, a dataset beside a paper, a signed copy clipped to a page. This tool reads those files out and gives each one back on its own. It looks in the two places the format keeps them — the document-level embedded-files list, which is also where a PDF Portfolio stores its members, and the paperclip (file attachment) annotations that sit on individual pages. Everything happens in your browser: the PDF is read from your disk into memory, and nothing is sent to a server.

What it never touches is the pages themselves. Text, tables, vector drawings and the pictures printed on a page are page content, not attachments, so none of them turn up in the result. A PDF holds embedded files only if someone put them there, so a plain document comes back with zero attachments, and that is the honest answer rather than an error — among the test fixtures, a 4 KB five-page text document and a 179 KB 300-page file both come back with none (measured on Node 22, not in a browser).

Wanted the photos printed on the pages instead? Extract Images from PDF pulls the bitmaps out of the page content, which is a different job entirely.

What you get when you extract PDF attachments

The result is one file per attachment, plus a table that tells you what each one is. Rows show the file name, the formatted file size, and the source: Document attachment, or Paperclip on page 7, followed by the description the PDF recorded for that file if there is one. When cleaning the name up changed it, the name as it was stored appears underneath as Original name. The table spells out up to 200 rows; past that, a final row says how many more there are.

When more than one attachment comes out, the first result is normally a ZIP of all of them and up to 20 single files follow it, so you can take one thing without unpacking anything. A single attachment is handed over on its own, with no ZIP. There is one more case without a ZIP: if an attachment is named exactly __proto__ — a name that would be lost inside the archive — the page skips the ZIP, says so, and lists every attachment separately instead. The ZIP uses storage mode (level 0): it packages the recovered bytes without applying another compression pass.

Previews are deliberately narrow. PDF, PNG, JPG, GIF and WebP attachments are shown in the page; everything else, an attached HTML or SVG file included, lands on the generic card that says the format can't be previewed here, with the download button next to it. That keeps an attached web page or vector file from being rendered by the browser on a page you only came to for the file itself. Downloading is unaffected, and Download all saves the results one after another rather than bundling them again.

What is preserved, and what changes

Supported, well-formed attachment streams are decoded without format conversion. Unsupported or malformed streams may not be recovered correctly; this tool does not verify checksums. The PDF you added is only read; it is not modified or re-saved.

File names can change, because a name written inside a PDF is not always a name your computer will take. Four things are cleaned up, and the stored name appears under the new one as Original name whenever cleaning changed it.

Dates and integrity checks are not carried over. A PDF can record a creation date, a modification date, a size and a checksum for each attachment; none of those are read, so a saved file is dated the moment you downloaded it, and the tool can't tell you whether an attachment was altered after it was attached. It doesn't scan for malware either. Extensions that commonly carry code — .exe, .bat, .js, .xlsm, .html, .svg, .lnk among others — are flagged in red in their own row, with one summary warning under the list, but nothing is blocked: what you save is your call, and it's worth knowing the PDF's origin before you open one of those.

Two more details worth expecting. If the same embedded file is referenced twice — once in the document list and once by a paperclip on a page — it comes out once, not twice. And the order follows the PDF: document-level attachments first, in the order the file lists them, then the ones hanging on pages, by page number.

What is cleaned upWhat you get
Folder partsThey are dropped, so an entry called ../../report.xlsx is saved as report.xlsx.
Characters a file system refusesControl characters and the ones Windows forbids — < > : " | ? * — become underscores. Zero-width, bidirectional and byte-order-mark characters are stripped, which defeats a name that hides a direction override to make an .exe look like a .pdf. Reserved names such as CON and NUL get an underscore in front.
LengthA name longer than 120 characters is shortened. A suffix longer than 16 characters counting the dot is not treated as an extension at all, so it can be cut away in that shortening.
Repeated namesTwo attachments with the same name, ignoring case, become report.xlsx and report (2).xlsx, so neither overwrites the other.

How a name stored inside the PDF becomes a name you can save.

When an attachment can't be pulled out

Recognized attachment entries that fail decoding, exceed the byte limits or contain only an external reference are listed as skipped. Malformed entries and branches beyond the traversal limits may not be listed. There are four reasons a listed entry can have. The attachment may be a reference only: the PDF names a file that lives on someone's computer and never contains the data, so there is nothing to extract. It may use an encoding this tool doesn't implement — LZWDecode, DCTDecode or Crypt, for instance — and those entries are skipped rather than guessed at. The stream may be damaged or incomplete. Or it may be too big: one attachment can come out at up to 100 MiB and all of them together at up to 250 MiB, and since earlier attachments use up the shared allowance, a later one can be refused even when it is under 100 MiB by itself. The skipped list spells out the first 50 entries, and a single PDF is read up to 1000 attachment entries.

The encodings it does read are Flate, ASCIIHex, ASCII85 and RunLength — including their short names, several layers chained one after another, and Flate's PNG predictor; if that data stops short of a whole row the attachment is reported as unreadable rather than handed over with its tail missing. Decoding is bounded. For Flate, ASCII85 and RunLength the size limit is applied while the data is expanding, so an attachment crafted to inflate into hundreds of megabytes is cut off and listed as skipped; ASCIIHex is the exception, finishing its stage before the final length check applies. That lowers the memory risk a decompression bomb carries — it is not a guarantee that a browser tab can never run out of memory.

Encryption splits into two cases. A PDF that needs a password to open is not extracted: the page reports that the file is password-protected and asks you to remove the password first, since there is no place here to type one. A PDF that opens freely but is locked against editing, copying or printing is the other case — it is unlocked with an empty password behind the scenes and its attachments are read as usual. The decryption module, 1.3 MiB served from this site, is loaded on demand when an encrypted PDF is encountered. If loading fails, the page reports an unsupported operation; if empty-password decryption fails, it reports password protection. A damaged file, or one that isn't a PDF, is reported as invalid right away.

Everyday reasons to save embedded files from a PDF

E-invoices are the clearest case. A Factur-X or ZUGFeRD invoice is an ordinary-looking PDF that also carries the invoice data as an attached XML file, usually named factur-x.xml, zugferd-invoice.xml or xrechnung.xml. Extract the attachments and that XML is in the list, ready to download and feed into accounting software; XML has no preview here, so it arrives on the download card. Supported, well-formed attachment streams are decoded without format conversion; unsupported or malformed streams may not be recovered correctly, and this tool does not verify checksums.

A PDF Portfolio — the container built when several documents are wrapped into one PDF — keeps its members in the same embedded-files list, so this is how you get the parts out without Acrobat: the spreadsheet stays an .xlsx, the presentation stays a .pptx, each one saved as its own file. Academic papers do the same thing with datasets, supplementary tables and code; a signed contract can carry the editable original; a scanned form can carry a machine-readable copy clipped to a page.

It is also a quick way to answer a question a reader without an attachments pane can't: does this PDF contain anything beyond what I can see? Add the file, click Extract attachments, and you get the enclosed files, a note naming any the tool could not read, or a plain statement that none were found.

If what you actually need is the wording printed on the pages, PDF to Text copies out the text layer instead.

How this tool is checked

  • The logic behind this tool is covered by 28 automated test cases (hand-checked examples, edge cases and invalid input), and they run again before every release.
  • Before each release, a real browser opens this page, runs it on sample files (including a damaged one) and checks the file it produces.
  • Your files are processed in your browser and are never uploaded to our server.
  • Formulas, figures and definitions are checked against the sources listed at the end of this page.

How we build and test our tools →

Frequently asked questions

Are my files uploaded when I extract PDF attachments?
No. The PDF is read and the attachments are written inside your browser, so nothing reaches a server. Closing the tab clears this page's working state; files you downloaded remain on your device.
Why does it say my PDF has no attachments?
The tool found no readable attachment entries. Page images and text are separate from attachments; malformed entries or traversal limits can also affect detection. Use PDF to Image or PDF to Text for what is printed on the pages.
Can I extract attachments from a password-protected PDF?
Not if a password is needed to open it: remove the password in a PDF reader first, then come back. A PDF that opens normally but is locked against editing or copying is read as usual, attachments included.
How do I get the XML out of a Factur-X or ZUGFeRD e-invoice?
Extract the attachments and the XML — typically factur-x.xml, zugferd-invoice.xml or xrechnung.xml — appears in the list with its size. XML can't be previewed in the page, so it comes as a download. No format conversion is applied; integrity is not verified.
Does this work with a PDF Portfolio or PDF package?
Yes. A portfolio stores its documents in the same embedded-files list this tool reads, so each component comes out as its own file, normally with a ZIP of all of them when there is more than one. If a file is named exactly __proto__, all files are offered separately instead.
Can I download all PDF attachments as a ZIP?
Usually, yes: when more than one attachment is recovered, the first result is a ZIP containing them all, followed by up to 20 individual files. A single attachment is offered without a ZIP. If an attachment is named exactly __proto__, every recovered file is offered separately instead.
Why is one of my attachments marked in red?
Its extension is one that commonly carries code — .exe, .bat, .js, .xlsm, .html or .svg among others. It is a warning, not a block: nothing is scanned for malware, so check that you trust the PDF before opening that file.
Can I process several PDFs in one go?
No, one PDF of up to 50 MiB at a time. Dropping several files adds none of them and the message says how many were turned away, so remove the current file before choosing the next.

Add this tool to your website

Free for any website, personal or commercial. Paste the code where you want the tool to appear — it works on WordPress, Blogger, Google Sites, Notion and plain HTML.

<div class="gingertool-widget" data-embed="https://gingertool.com/embed/en/pdf/extract-pdf-attachments/" data-height="640" style="font-size: 13px; line-height: 20px; margin: 6px 0 16px; text-align: left">Extract PDF Attachments &#183; <a href="https://gingertool.com/en/pdf/extract-pdf-attachments/">Gingertool</a></div>
<script src="https://gingertool.com/embed.js" async></script>

Please keep the credit link below the tool. Embedded tools show no ads.

Step-by-step: Google Sites · Blogger · WordPress · Notion

Cite this tool

Using a result in a report, paper or assignment? Copy a ready-made reference.

APA
Gingertool. (2026). Extract PDF Attachments [Online tool]. Retrieved November 27, 2026, from https://gingertool.com/en/pdf/extract-pdf-attachments/
MLA
“Extract PDF Attachments.” Gingertool, November 27, 2026, https://gingertool.com/en/pdf/extract-pdf-attachments/. Accessed November 27, 2026.
BibTeX
@misc{gingertool-extract-pdf-attachments,
  author = {{Gingertool}},
  title = {Extract PDF Attachments},
  year = {2026},
  url = {https://gingertool.com/en/pdf/extract-pdf-attachments/},
  note = {Accessed: 2026-11-27}
}