Remove JavaScript from PDF
Strip embedded scripts from your PDFs in one click for a safer document.
Free, fast, and privacy-first.
Remove JavaScript from your PDFs
or drag & drop files here
PDF files onlyup to 30 filesup to 100 MB each300 MB total
Selected files 0
document.pdf
0 KB
Your PDF is ready
Your download should have started automatically.
Remove JavaScript from a PDF — strip embedded scripts for safety
PDFs can carry JavaScript — document-level scripts, a script that runs the moment the file opens (OpenAction), page and document triggers on open/close/print/save, scripts attached to annotations, and a form's calculation, format, and validation logic. Remove JavaScript strips all of it. Scripts have legitimate uses in interactive forms, but they're also a common way malware hides in a document, so removing them makes a PDF safer to open and share.
Each script object and its source are deleted from the file, not just unlinked, so the code doesn't linger in the bytes. The pages, text, and images are untouched and the document still reads normally — only interactive behaviour that depended on a script (like a form field that auto-calculates a total) stops working. Clickable links are kept, because they use link actions rather than JavaScript. Clean one PDF or up to 30 at once (a ZIP for several), entirely in your browser with pdf-lib. To also strip metadata, attachments, and annotations, use Sanitize PDF.
-
Every script vector
Document scripts, OpenAction, open/print triggers, and form calculation logic.
-
Safer to open & share
Removing scripts closes a common malware hiding spot in PDFs.
-
Links are kept
Clickable links use link actions, not JavaScript, so they keep working.
-
Deleted, not unlinked
Script objects and their source are removed, so the code doesn't linger.
How to remove JavaScript from a PDF
-
Add your PDF(s)
Drop one file (or up to 30) into the upload area.
-
Remove the scripts
Click “Remove JavaScript”. Every embedded script (document actions, open actions, and form scripts) is stripped from each file.
-
Download
Download your cleaned PDF (a ZIP for several). Everything happens in your browser.