Add Password to PDF
Encrypt a PDF with a password in your browser so only people with the password can open it.
Runs in your browser — files never leave your device
How it works
Pick a PDF, type a password twice, and download a copy that refuses to open without it. The encryption runs entirely in your browser using an open-source fork of the pdf-lib library that implements the PDF format’s standard security handler — so the protected file behaves normally everywhere, and Adobe Acrobat, Apple Preview, phones, and web browsers all show their familiar password prompt.
PDFs support two passwords. The user password locks opening the document; the owner password grants full access and governs permission flags. This tool sets both to the password you type, which keeps the outcome simple: one password, and the file does not open without it.
The cipher is the strongest standard scheme your file’s PDF version allows: AES for modern documents (128-bit for PDF 1.6/1.7, 256-bit for extended 1.7) and the older 128-bit RC4 scheme for legacy PDF 1.4/1.5 files. In every case the page contents are genuinely encrypted inside the file — this is not an overlay or a viewer trick — and the pages themselves are untouched, so the document looks identical once opened.
Drop statement.pdf, set a password, and you get protected-statement.pdf ready to email or archive — payslips, contracts, tax records, ID scans. Two warnings before you rely on it. There is no recovery: forget the password and the contents stay locked, here and everywhere else. And the protection is only as strong as the password — real encryption with a guessable password still falls to offline cracking tools, so use a long passphrase for anything that matters.
Privacy is the reason to do this in a browser at all: a document sensitive enough to encrypt is exactly the document you shouldn’t upload to a stranger’s server alongside its password. Here the file is read into memory on your device, encrypted there, and downloaded from there. The password never leaves your machine — close the tab and nothing remains.
Frequently asked questions
- What’s the difference between a user password and an owner password?
- A user password (the “open password”) must be entered before the PDF will open at all. An owner password normally leaves the file readable and only restricts actions like printing or editing. This tool sets both to the password you type, so the effect is unambiguous: without the password, the document doesn’t open.
- What encryption does the tool apply?
- The PDF format’s standard encryption, at the strongest level the file’s version supports: AES for modern documents — 128-bit for PDF 1.6/1.7, 256-bit for extended 1.7 — and the older 128-bit RC4 cipher for legacy PDF 1.4/1.5 files. Because it’s the standard scheme, every mainstream reader shows its normal password prompt.
- What if I forget the password?
- There is no recovery, reset, or back door — the decryption key is derived from the password itself, so without it the contents stay locked. Our remove-password tool needs the current password too, so it can’t rescue you either. Record the password in a password manager before you archive or share the file.
- How strong is the protection, really?
- Exactly as strong as your password. The encryption itself is standard and sound, but offline cracking tools can try millions of guesses against a copied file, so “1234” protects nothing. Use a long, unique passphrase for documents that genuinely matter.
- Can I allow opening but block printing or copying?
- Not with this tool — it sets an open password rather than permission flags. That’s a deliberate choice: permission-only restrictions depend on each viewer choosing to honor them, and some simply ignore them. An open password is the restriction that actually holds.
- Will encryption change my document or its size?
- The pages are unchanged — same text, images, and layout, just stored in encrypted form — and the file size stays roughly the same. Since the whole file is processed in your browser’s memory, the practical size limit is your device’s RAM; typical documents encrypt in a second or two.
- Is my PDF or password uploaded anywhere?
- No — and for this tool that’s the whole point. The file is read into your browser’s memory, encrypted there, and downloaded from there; the password is used locally to derive the key and is never transmitted, logged, or stored. A document worth encrypting is exactly the document you shouldn’t upload to a stranger’s server next to its password.
Related tools
- Merge PDFCombine multiple PDFs into one file, right in your browser. Reorder before merging; nothing is uploaded.
- Split PDFSplit a PDF into individual pages or ranges locally and download the parts.
- Compress PDFReduce PDF file size in your browser by rebuilding the document. No upload required.
- PDF to ImageConvert PDF pages to PNG images locally using pdf.js. Each page becomes a downloadable image.
- Rotate PDFRotate all or selected PDF pages by 90° in your browser and download the result.
- Reorder & Delete PDF PagesReorder or remove pages from a PDF locally, then download the rebuilt document.