Guide
Password-Protected PDFs: What Browser Tools Can and Can't Do
By Happy Turtle Tech · Published · Updated
Part of the topic PDF Privacy: What Leaves Your Device and What the File Reveals
You drop a PDF into a merge tool and it refuses to load. Or stranger still: the file opens perfectly in your usual reader, no password prompt, nothing unusual - and yet every tool you try says it can't process it. The explanation is that "password-protected" covers two quite different mechanisms, and the confusing case is almost always the second one. We counted: of 307 encrypted PDFs in a sample of 9,825, 303 were that second kind.
The two kinds of password
A user password (also called an open password) encrypts the document. Without it, the file's contents are genuinely unreadable - not hidden, encrypted. Your reader prompts you before showing anything. This is real protection: without the password there is no document to work with, only ciphertext.
An owner password (also called a permissions password) is different in kind. The file still opens normally for everyone, with no prompt. What it carries is a set of flags declaring what readers should allow - no printing, no copying text, no editing, no extracting pages. The content is often encrypted too, but with a key any reader can derive, so opening works while the restrictions ride along as instructions.
That second one is the source of nearly all the confusion. Nothing in your day-to-day experience of the file suggests it's protected, because your reader is quietly honouring flags you never see.
What we measured: how many PDFs are protected, and how
We read the encryption dictionary of every PDF in two public collections: 4,840 US government documents from 2009, and 4,985 PDFs picked from a 2021 crawl of the open web. A file counts as the owner-password kind when PDF.js opens it with no password, as every reader does, and as the open-password kind when it cannot.
| GovDocs1, 2009 | Web crawl, 2021 | |
|---|---|---|
| PDFs read | 4,840 | 4,985 |
| Encrypted | 197 (4.1%) | 110 (2.2%) |
| Opens with no password (owner password only) | 197 | 106 |
| Needs a password to open | 0 | 4 |
Protection is the exception, and the open-password kind is the rare exception. 3.1% of the 9,825 files were encrypted at all, 4.1% of the older collection and 2.2% of the newer. In the older one every encrypted file (197) opened without a password. In the newer one 106 of 110 did, so a PDF that is encrypted and refuses to be edited is far more likely to be an owner-password file than one you need to type something to open.
The cipher changed between the two collections. Every encrypted file from 2009 used RC4, the format's older cipher (106 with a 40-bit key, 90 with a 128-bit key and 1 with a 64-bit key). By 2021, 64 of 110 still did, 36 used 128-bit AES and 10 used 256-bit AES, the strongest scheme PDF supports. Across both collections, 261 of the 307 encrypted files used RC4.
What the restrictions actually block
An owner password is a list of switches. Across the 303 files that open without a password, these are the ones the author turned off:
| What the file turns off | GovDocs1, 2009 | Web crawl, 2021 |
|---|---|---|
| Edit the content | 167 (85%) | 102 (96%) |
| Add comments and notes | 139 (71%) | 77 (73%) |
| Fill in form fields | 72 (37%) | 69 (65%) |
| Insert, delete or rotate pages | 76 (39%) | 95 (90%) |
| Copy text and graphics | 49 (25%) | 69 (65%) |
| Copy for screen readers | 10 (5.1%) | 26 (25%) |
| Print in high quality | 9 (4.6%) | 20 (19%) |
| Print at all | 7 (3.6%) | 11 (10%) |
Editing is almost always the thing blocked; printing almost never is. 167 of the 197 older files and 102 of the 106 newer ones forbid editing, while only 7 and 11 forbid printing. Copying text and graphics is blocked in 49 and 69. And 28 older files and 1 newer one were encrypted with every switch left on: they carry the machinery of protection and restrict nothing.
Why the restriction is a convention, not a wall
Owner-password restrictions work because software agrees to respect them. A well-behaved PDF library reads the permission flags and declines to modify a document whose author said not to. Nothing about the encryption itself enforces this - it's an honour system baked into the format, and one that tools follow because ignoring an author's stated wishes is the wrong default.
This is why you'll find tools online that strip these restrictions. They can, technically. Whether they should depends entirely on whose document it is, which is a question the tool has no way to answer and you do.
Adding a password to your own PDF
HerePDF's password protect tool adds an open password in your browser, with AES-256 - the strongest encryption PDF supports. Whoever has the password can do anything with the document, and there are no print or copy restrictions to rely on, because many tools ignore them. A forgotten password cannot be recovered by anyone, so keep it somewhere safe - and choose a long one: the real attack on a protected PDF is guessing the password, not breaking the encryption.
We checked what a stranger can read from the result. We ran the tool over 300 real PDFs of 3 to 40 pages and read each output back. 298 came out as AES-256 with every permission granted. None of them opened without the password or with a wrong one, and with the right one every page came back with the same text (298 of 298 files checked page by page). We then looked for strings in the clear, counting a string only when the same scan could read it in the original: the first line of page one was readable in 0 of 150 files, and 0 of 914 title, author and similar fields. The page tree was readable in 0 of 298.
One caveat the FAQ used to overstate: in 1 of the 298 files the page size was still readable. The format only lets objects numbered with generation zero go into the compressed blocks that get encrypted; that file had dozens of objects with generation one, and their dictionaries, which hold the page size, stay in the clear. The text and pictures are still encrypted. So say "the text, pictures and properties" rather than "everything" when you describe a protected file.
The measurement found a bug, now fixed. The first run, before the fix, protected 300 files and left a page's text readable in 1 of the 152 where the scan could read the original: a damaged part of the file that the program could not parse was written back unchanged, so the protected file still carried that page as plain text. The tool now refuses such a file (2 of 300 in the second run) and tells you to re-export it, rather than hand back a file that says it is encrypted and is not.
What HerePDF does when it meets one
The tools that change a document run on pdf-lib inside your browser, and it won't modify an encrypted file as it stands. If a file needs a password to open, the tool asks for it when you drop the file in. Type it and the tool works on an unlocked copy; the file on your disk is left alone. What you download from there is not password-protected - use password protect to lock it again - and a digital signature on it will no longer validate. The exception is a file that has an open password and also restricts printing, editing, copying or annotating: the password opens it, but the tool then says it is restricted and does not go on, because a decrypted copy would drop those restrictions.
If a file opens without a password but carries an owner password, you'll get an explanation rather than a result: merge, split and the other editing tools say "editing restrictions". In our count that is the answer for 303 of the 303 owner-password files, and the 4 open-password files ask for their password instead. We don't remove an owner password you can't supply: that means overriding a restriction someone deliberately applied, and a site whose entire premise is not doing things to your documents behind your back is a poor place to add a feature whose main use is overriding someone else's stated intent. The two tools that pull content out rather than change it, extract text and PDF to image, can read a file that opens without a password. They still check its permissions, and refuse one whose author disallowed copying: 118 of the 303, and they read the other 185.
What to do instead
If it's your own document and you have the password:
- Open it in Adobe Acrobat, macOS Preview, or your PDF reader of choice, and re-save or export a copy without protection. Most readers offer this once the file is unlocked.
- Better still, go back to the source. If it came from Word, a design tool, or an export process, re-export it without the security setting - you'll get a cleaner file than any after-the-fact stripping.
- Printing to PDF from within the unlocked document produces an unprotected copy, though you lose text selectability if your reader rasterises it.
If it's your document and you've lost the password: recover the original source file if one exists. Password recovery on a user-password PDF means brute force, which is slow, often futile, and requires handing your document to whatever tool is doing the guessing.
If it isn't your document: ask whoever sent it for an unrestricted copy. That's not a workaround, it's the correct step - the restriction is a statement about how the author wants the file used.
Diagnosing which one you have
If the file prompts for a password before showing you anything, that's a user password and the document is genuinely encrypted. If it opens straight away but tools reject it, or your reader greys out printing or text selection, that's an owner password. Most readers will tell you outright: look for a "Security" or "Permissions" section in the document properties, which usually lists exactly which operations are disallowed.
A third possibility worth ruling out: the file might not be protected at all, just malformed. PDFs produced by unusual software, or truncated by an interrupted download, can fail to load for reasons that have nothing to do with security. If your reader also complains, or the file size looks wrong, suspect corruption before encryption.
How we counted, and the limits
Both collections are published sets of PDFs that anyone can download: GovDocs1 (we read 4,840 files from every fiftieth of its archives) and a 2021 web crawl (we read 4,986 files from five of its archives). 1 of them could not be read at all and are not in any figure. An encrypted file is one whose newest trailer names an encryption dictionary; the cipher comes from that dictionary, and the switches from its permission word. A switch counted here is what the file declares, not what any one program enforces. The Password Protect test used 300 of the older collection's files that are not encrypted already.
These are documents that were put on the open web, so they say little about the files people keep private, such as bank statements and contracts, where an owner password may be far more common. We could not open the 4 open-password files, having no password for them, so we only know their cipher. File names are not published, only counts; the data and the method are there to check against.
Frequently asked questions
Why does a PDF that opens fine for me fail to load in an online tool?
Most likely it carries an owner password - it opens without prompting but is flagged as restricted, and well-behaved tools refuse to modify it. Your viewer honours the restriction silently, so nothing looks wrong until you try to edit or convert the file.
How common are password-protected PDFs?
Not very, and most of them are the kind that open without a password. In 9,825 real PDFs from two public collections, 307 (3.1%) were encrypted, and 303 of those 307 opened with no password at all. Only 4 needed one. These are public web documents, not bank statements or contracts, so your own files may differ.
Can HerePDF remove a password from a PDF?
It can open a password-protected PDF if you type the password: drop the file into any tool and it asks for the password, then works on an unlocked copy. Your original file is not changed, and nothing you type leaves your browser. What it will not do is lift an owner password's restrictions - the kind that lets a file open freely but blocks editing or copying. There is nowhere to type an owner password, and a file with an open password that also restricts printing, editing, copying or annotating is refused even after you type the open password, because saving an unlocked copy would override a restriction the author set. If you own the document, re-export it without protection from whatever produced it.