Fix · a common PDF problem

Can a PDF carry a virus?

Short answer. A PDF can contain active content: JavaScript, actions that run when it opens, and attached files. Most are harmless (form calculations), but an unexpected script or an attached program from a stranger is a warning sign. Inspect before you open it in a full reader.
PDF inspectorRead in this tab, never run
Drop a PDF anywhere on this pageThe instant X-ray reads the raw bytes; the full inspector then parses every object in a Web Worker. Nothing is uploaded or executed.
What you’ll see
  • JavaScript and actions that run on open
  • Attached files, fonts (embedded or not), images
  • Version, encryption, incremental saves, metadata
Requests since you added a file: 0Counted by this page · check it without trusting us

Causes and fixes

  1. 1
    JavaScript or an action that runs on openUsed legitimately by forms; suspicious in an invoice from someone you don’t know.
    See the scripts
  2. 2
    Attached filesA PDF can carry other files inside it, including programs.
    List attachments
  3. 3
    You only need the contentFlattening, or converting pages to images, removes active content from the copy you keep.
    Flatten

What is going on

PDF is more than a picture of pages. The format allows JavaScript, actions triggered when a document opens or a field changes, links to outside resources, and embedded files of any type. Government and tax forms use scripts for calculations and validation; that is normal. The same features have been misused to deliver harmful files, which is why readers ask before opening attachments or running scripts.

The inspector above reads the file’s structure without executing anything: it lists every JavaScript location with the first characters of the script, any action set to run on open, attached files with their names and sizes, fonts, images and metadata. Reading a PDF this way is safe because nothing in it is run.

This is a structural inspection, not an antivirus scan. If a PDF from an unknown sender has scripts or attachments you didn’t expect, don’t open it in a full PDF reader, and confirm with the sender by another channel.

Checked 2026-10-05. The diagnostic above runs in this tab; your file is not uploaded.