Skip to content
DevToolKit

PDF Attachments Viewer

View, extract, and remove embedded file attachments from PDF documents. List all attached files with sizes, download individual files, or strip attachments. Runs locally in your browser.

pdf

Drop your PDF here, or click to browse

Files are processed entirely in your browser — never uploaded

Processed locally
Was this tool helpful?

How to Use

Inspect and manage PDF attachments in four steps:

  1. Upload your PDF — Drag and drop the file or click to browse. The tool immediately scans the document's EmbeddedFiles name tree and lists every attachment it finds, showing each file's name and size.
  2. Review the attachment list — Each embedded file appears as a row with a checkbox, filename, and size. The header shows the total number of attachments and their combined size, giving you a quick overview of what the PDF carries.
  3. Extract files you need — Click the download icon next to any single attachment to extract just that file, or use the "Extract all" button to download every attachment at once. Files are saved with their original filenames.
  4. Remove unwanted attachments — Select attachments using checkboxes (or use "Select all" / "Deselect all"), then click "Remove selected." The tool rebuilds the PDF without those attachments and offers a cleaned version for download.

Every operation runs locally in your browser using pdf-lib. Your PDF is never sent to any server, making this tool safe for confidential documents.

About This Tool

PDF file attachments — formally called embedded file streams — are defined in section 7.11.4 of the PDF specification (ISO 32000-2:2020). They reside in the document catalog's /Names dictionary under the /EmbeddedFiles name tree. Each entry in this tree maps a string key to a file specification dictionary (/Filespec), which in turn points to the actual file data stored as a compressed stream object.

A file specification dictionary contains several keys that describe the attached file. The /UF key holds the Unicode filename, while /F provides a backward-compatible ASCII filename. The /EF (embedded file) dictionary links to the stream object that holds the raw bytes. Additional metadata can include a /Desc description string, MIME type via /Subtype, creation and modification dates, and a checksum for integrity verification.

The name tree structure uses a balanced tree of intermediate nodes (containing /Kids arrays) and leaf nodes (containing /Names arrays of alternating key-value pairs). This design allows efficient lookup in PDFs with hundreds of attachments. This tool walks the entire tree recursively, collecting every leaf entry regardless of tree depth, so it can discover attachments that simpler parsers might miss in deeply nested structures.

Attachments differ from annotations in an important way. Annotations are per-page objects stored in each page's /Annots array — they are visual overlays like highlights and comments. Attachments are document-level objects independent of any page. They do not render visually within the PDF content; instead, viewers that support them display an attachment panel or paperclip icon. Tools like PDF Remove Annotations handle per-page annotation objects, while this tool focuses exclusively on the document-level EmbeddedFiles tree.

When removing attachments, the tool deletes the corresponding file specification dictionaries and stream objects from the name tree. If all attachments are removed, it also deletes the /EmbeddedFiles key entirely, and if the /Names dictionary becomes empty, it is removed from the catalog too. For partial removal, the tool rebuilds a flat name tree containing only the retained entries. This approach produces a valid, compact PDF structure without orphaned references.

Why Use This Tool

Managing PDF attachments is essential in several common document workflows:

  • Extracting supporting data — Government filings, scientific papers, and financial reports often embed source data as spreadsheets, XML files, or supplementary PDFs. Readers need to extract these files to analyze the underlying data. XBRL filings submitted to the SEC, for example, embed taxonomy schemas and instance documents as PDF attachments.
  • Reducing file size before sharing — Attachments can add megabytes to a PDF without being visible during normal viewing. A contract PDF with embedded original Word documents, revision histories, or font files quickly balloons in size. Stripping attachments before email distribution or archival storage reclaims that space. Use PDF Compress afterward for additional size reduction.
  • Security and compliance review — Embedded files can carry malware, macros, or executables concealed inside an otherwise innocent-looking PDF. Security teams inspect attachments before allowing PDFs into controlled environments. Regulatory compliance may also require stripping attachments from documents before public release to prevent accidental disclosure of internal files.
  • Discovering hidden content — Many PDF viewers — including Chrome's built-in viewer, Safari Preview, and most mobile apps — do not display attachment panels. Users receiving such PDFs may not realize files are embedded. This tool surfaces every attachment regardless of which viewer created or last opened the document. Related tools like PDF Edit Metadata and PDF Sanitize help examine other hidden document properties.
  • PDF/A archival preparation — The PDF/A-3 standard (ISO 19005-3:2012) is the only PDF/A variant that permits embedded files, and even then only with specific MIME type declarations. Converting a PDF to PDF/A-1 or PDF/A-2 requires removing all attachments first. Stripping embedded files is a prerequisite step in many digital preservation workflows.
  • Document forensics — Legal discovery and e-discovery processes often require cataloging every file embedded in a document set. Listing attachments with their names and sizes creates an inventory that investigators can cross-reference against known file hashes or naming patterns. Inspecting PDF Page Dimensions and PDF Flatten are complementary steps in forensic document review.

All processing happens locally in your browser using client-side JavaScript. Your PDF and its embedded files never leave your device — no upload, no cloud storage, no third-party access. This makes the tool appropriate for sensitive documents including legal filings, medical records, financial statements, and proprietary data packages that cannot be transmitted to external servers.

FAQ

What are PDF attachments?
PDF attachments are files embedded inside a PDF document using the EmbeddedFiles name tree in the document catalog. They can be any file type — images, spreadsheets, text files, or even other PDFs. Attachments travel with the document and can be extracted by PDF viewers that support the feature.
Can I extract individual attachments?
Yes. After uploading a PDF, the tool lists every attachment with its filename and size. Click the download button next to any attachment to extract and save just that file. You can also extract all attachments at once.
What happens when I remove attachments?
Removing attachments deletes their entries from the PDF's EmbeddedFiles name tree and the associated file stream objects. The rest of the document — text, images, annotations, and forms — remains untouched. The resulting PDF will be smaller by the combined size of the removed attachments.
Is my PDF uploaded to a server?
No. All processing runs locally in your browser using the pdf-lib JavaScript library. Your PDF and its attachments never leave your device.
Why can't I see attachments in some PDF viewers?
Not all PDF viewers display embedded file attachments. Web-based viewers and mobile apps often ignore the EmbeddedFiles tree. Adobe Acrobat, Foxit Reader, and some desktop Linux viewers support attachments. This tool reads attachments regardless of which viewer you normally use.