Add a password to your PDF
Password-protect a PDF in your browser with AES-256 encryption. Preview the file, set an open password and permissions, then download the protected PDF.
Private by design — files stay in your browser
Add a PDF file to get started.
Drag & drop a PDF here
one file at a time — it never leaves your browser
How it works
Protect PDF encrypts an unprotected PDF with a password using real AES-256 PDF encryption. The encryption is applied to the document's existing objects and streams in your browser, so text, images, and vectors are preserved — pages are not flattened into pictures. The file you download needs the password to open in any compliant PDF viewer. You also choose which actions the PDF's permission flags allow. Nothing is uploaded: the file and the password stay on your device.
How to use it
- Under 'Drag & drop a PDF here', click 'Choose a PDF'. One file at a time; extra files are ignored with a warning.
- Check the preview, then in the 'Password & permissions' panel enter 'Password to open PDF' and 'Confirm password'. Each field has a 'Show'/'Hide' button so you can check what you typed.
- Under 'PDF viewer permissions', leave the four checkboxes on or turn off 'Allow printing', 'Allow copying', 'Allow modifications', or 'Allow annotations'. All are on by default.
- Read the note that permissions may be ignored by some viewers and are not a security boundary.
- Click 'Protect PDF (N pages)'. The button stays disabled until both password fields contain text.
- Download with 'Download protected PDF' to save <name>-protected.pdf, or choose 'Protect another PDF'. Store your password safely — the tool cannot recover it.
Password settings
Two fields are required: 'Password to open PDF' (placeholder 'Required to open the PDF') and 'Confirm password' ('Repeat the password'), each with a Show/Hide toggle. They must match exactly; the button reports empty or mismatched fields. There is no minimum length or complexity rule in the tool, but this password is the only way to open the downloaded file, so choose one you can remember and keep it safe. The password is not stored in a recoverable form — the tool cannot retrieve it for you. The encryption uses the PDF revision 6 password scheme; tests confirm an Arabic password round-trips, though some mixed-script combinations can be rejected by the PDF specification.
Permission controls
Four checkboxes write standard permission flags into the encrypted PDF: 'Allow printing', 'Allow copying' (select or copy text and images), 'Allow modifications' (change document content), and 'Allow annotations' (comments and markup). All four start on. Turning options off clears the matching bits in the PDF's /P value — with everything allowed the value is -4, and with everything denied it is -64. The UI states plainly that some viewers may ignore these permissions and that they should not be considered a security boundary.
Security and compatibility
Encryption is AES-256 with the standard PDF security handler, performed in the browser using Web Crypto — no native code and no network calls. The output carries a real /Encrypt dictionary: tests confirm a viewer refuses to open it without the password or with a wrong password, while the correct password restores the page count and selectable text. AES-256 needs a secure context, so the page must be served over HTTPS or localhost. There is no AES-128 option.
Output and download
The result is a single PDF named <name>-protected.pdf, based on the source filename with .pdf removed. Its summary shows the page count, file size, 'AES-256', and the permission state. Click 'Download protected PDF' to save it, or 'Protect another PDF' to clear the workspace. The password is required to open the file and cannot be recovered by this tool, so store it separately. Changing a password or permission clears the previous download until you protect the PDF again.
Limitations
- One PDF at a time, accepted as application/pdf or by a .pdf filename; extra files are ignored.
- Already password-protected PDFs are rejected. Unlock them first, then protect the unlocked copy.
- AES-256 only, and it requires a secure context (HTTPS or localhost) for Web Crypto.
- A single password acts as both the open (user) password and the owner password; there is no separate owner-password field.
- Permission flags are embedded in the PDF but some viewers may ignore them — they are not a security boundary.
- No coded file-size or page-count limit was found. Content is preserved without rasterization.
- The password cannot be recovered by this tool; keep a copy somewhere safe.
- Processing is entirely client-side; the file and password are not uploaded.
Troubleshooting
'“name” is not a PDF file.'
Choose a PDF; other file types are rejected at upload.
'Protect works on one PDF at a time — using “name” and ignoring N other file(s).'
Add a single PDF per run; the message names the file that was kept.
'“name” is already password-protected. Remove its password first, then protect it again.'
Use Unlock PDF with the password you know, then add the unlocked copy here.
'Enter a password to protect your PDF.' or 'Passwords do not match. Make sure both fields are identical.'
Fill in both password fields with the same value before clicking Protect PDF.
'Password protection needs a secure page (HTTPS or localhost) for AES-256 encryption.'
Open the site over HTTPS or localhost; Web Crypto is unavailable on insecure pages.
'This password contains characters that cannot be stored in a PDF. Try a different password.' or 'Protection failed. Please try again.'
Try a different password, or retry with another copy of the PDF.
Real-world examples
- Email a contract with an open password so only someone who has it can read the file.
- Share a client deliverable with printing and copying switched off, remembering that viewers may ignore those flags.
- Watermark a draft and add page numbers, then protect the finished version before sending.
- Protect an invoice with a password stored in a password manager, then send the file and password by separate channels.
- Prepare a PDF for a recipient by confirming the password opens it before you share the download link.
Frequently asked questions
What kind of encryption does this use?
Real AES-256 PDF encryption with the standard security handler, applied in your browser with Web Crypto. Tests confirm the file carries an /Encrypt dictionary, will not open without the password or with a wrong one, and keeps its page count and selectable text when opened correctly.
Can I set different passwords for opening and editing?
No. The same password is used as the open (user) password and the owner password. There is no separate owner-password field in this tool.
Do the permission checkboxes really stop copying or printing?
They write standard PDF permission bits — all allowed is -4, all denied is -64 — but the UI warns that some viewers may ignore them. They should not be treated as a security boundary; the open password is the actual protection.
Can I protect a PDF that already has a password?
No. Already-encrypted files are rejected when you add them. Use Unlock PDF with the password you know, then protect the unlocked copy.
Why do I need HTTPS, and can I recover the password?
AES-256 encryption needs a secure context, so the page must be on HTTPS or localhost. The password is required to open the downloaded file and cannot be recovered by this tool — store it safely before you share the PDF.