Unlock a PDF
Drop it in and we will tell you what kind of lock it has, and what each way out of it costs.
How it works
- Drop your PDF in.
- We say which lock it has — a password, or restrictions.
- Choose how to take it off, and download the copy.
What it does
Most PDFs people call locked have no password at all. They are encrypted with an owner password — a permission bitmap that says no printing, no copying, no editing — and they open in every reader by double-clicking. Taking that off needs nothing from you but the file. A PDF that asks for a password before it will open is a different thing entirely, and for that one you have to know the password.
The two kinds of locked, and why it matters
Drop the file in and the first thing this does is say which one you have, because they have completely different answers. Restrictions come off with nothing supplied. A password does not come off at all without the password — the pages are encrypted, there is nothing to work around, and nothing here guesses. That limit is deliberate and it is not going to be relaxed.
Two ways out, and what each costs
Taking the encryption off leaves the document itself untouched — same text, same fonts, same form fields, still selectable and still searchable. That is qpdf, and qpdf cannot run in a browser, so it means uploading the file. Drawing a brand new PDF from the old one happens right here in your tab and uploads nothing, and it gets past any lock that is not a password; the cost is that every page arrives as a picture of itself, so the words stop being selectable and a form stops being a form. Both are offered, side by side, with the cost written on the button rather than in a footnote.
What happens to your file if you upload it
Exactly what happens with the protect tool: a temporary file, qpdf, the result straight back down, and both copies unlinked immediately. No database, no account, no caching. The password travels as a header rather than in a URL so that it cannot land in an access log along the way — and it is checked against the file in your own browser first, so a wrong one never leaves your machine at all.
What you can do afterwards
An unlocked PDF behaves like any other. It can be edited, merged, split, compressed or converted with the other tools here — all of which run in your browser, so once the lock is off, nothing else about your document needs to leave your machine.
Doing this from your own code
POST
/api/v1/pdfs
Post the locked PDF with unlock=1. A locked PDF is refused by default and the refusal names the lock, so you can decide rather than have it decided for you.
# refused first, on purpose — the body names the lock
curl -s https://docubend.com/api/v1/pdfs \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/pdf" \
--data-binary @locked.pdf
# yes, take it off
curl -s "https://docubend.com/api/v1/pdfs?unlock=1&title=Report" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/pdf" \
--data-binary @locked.pdf
const r = await fetch(`${BASE}/api/v1/pdfs?unlock=1&title=Report`, {
method: "POST",
headers: { Authorization: `Bearer ${TOKEN}`,
"Content-Type": "application/pdf" },
body: await readFile("locked.pdf"),
});
if (r.status === 409) {
const { locked, allows } = await r.json(); // "restrictions"
}
r = requests.post(f"{BASE}/api/v1/pdfs",
params={"unlock": 1, "title": "Report"},
headers={"Authorization": f"Bearer {TOKEN}",
"Content-Type": "application/pdf"},
data=open("locked.pdf", "rb").read(), timeout=120)
if r.status_code == 409:
print(r.json()["locked"]) # "restrictions"
X-Doc-Password.Questions
Can you remove a password I do not know?
No. If the PDF will not open without one, its pages are encrypted and nothing here will read them. This is not a limitation waiting to be fixed.
My PDF opens fine but will not let me print or copy. Can you fix that?
Yes, and it needs no password. That is an owner password — a permission setting, not a lock on the content — and taking it off is what most people come here for.
Does my file get uploaded?
Only if you choose the route that keeps your text selectable. The other route draws a new PDF from the pages in your own browser and sends nothing.
Is my password kept?
No. It is tried against the file in your own tab, and if you then choose the server route it is one process's argument — never written to a log or put in a URL.
What is the size limit?
25 MB on this route.
Can I do this from a script?
Yes. POST the file to /api/free/unlock with an X-Doc-Mode header of auto, decrypt or rebuild, or ask /api/free/inspect what kind of lock it has first.
What can I do with the file afterwards?
Anything the other tools do — and all of those run in your browser without uploading.
Next
| Tool | What it does | Runs in | Same thing, programmatically |
|---|---|---|---|
| Password protect a PDF | Put an AES-256 password on a PDF. | our server | POST /api/free/protect |
| Edit a PDF | Change the words already in the PDF, in their original font. | your browser | the document model |
| Merge PDF files | Join several PDFs into one, in the order you choose. | your browser | no endpoint |
| Convert PDF to Word | Get an editable .docx with the text as text. | your browser | no endpoint |