Remove a PDF password
A password-protected PDF becomes a real obstacle the moment it needs to be indexed, merged into a batch, or read by an automated system that has no way to type a passphrase into a dialog box. This remove PDF password API decrypts a PDF you own once you supply its existing password, handing back an unencrypted file that any downstream tool can open without friction.
Run it online
Run this on our servers with your account. Free tools run in your browser; this one bills your KIT balance per the price above.
Why an encrypted PDF stalls a pipeline
PDF encryption is designed to do exactly one job well: stop anyone without the password from opening the file. That's useful protection for a document at rest, but it becomes a wall the instant that same file needs to move through an automated pipeline — a text extractor can't read it, a merge tool can't combine it with other pages, a search index can't crawl it. The password itself isn't lost or unknown in these cases; it's simply sitting somewhere outside the workflow, and this endpoint is the step that reconnects the two so processing can continue.
How the decryption works
Submit the encrypted PDF along with its current password to POST /pdf/unlock, and the request returns a task_id right away since the work happens asynchronously. The engine uses the supplied password to decrypt the document according to the PDF encryption standard the file was protected with, and returns a fully unencrypted copy with the exact same pages, text, images and formatting as the original — no re-scanning, no re-authoring, just the removal of the password barrier itself. A password is required; this decrypts files you already have lawful access to, it does not attempt to crack or bypass one you don't know.
How PDF password protection actually works
The PDF specification has supported password-based encryption since its earliest widely adopted versions, distinguishing between a user password needed to open the file at all and an owner password that restricts actions like printing or editing while still allowing the file to be viewed. Over the years the underlying encryption strength has been upgraded through several revisions of the standard, but the basic shape has stayed the same: supply the correct password, and the document decrypts cleanly. That's the exact operation this endpoint performs on your behalf.
Where it belongs in an automated flow
It's the natural first step before any bulk processing of password-protected archives: unlocking a batch of encrypted invoices before running them through data extraction, decrypting protected statements before merging them into a single report, or preparing legacy encrypted files for migration into a document management system that doesn't handle encrypted input. Once unlocked, the file is free to move through compression, splitting, form-filling or any other step in a pipeline without the password becoming a recurring manual task.
Delivery, pricing, and status
The decrypted file is delivered by a signed webhook, recommended for automation, or a signed link valid for 24 hours; source and output are deleted after the retention window and never used for training. Pricing is $0.042 per request plus $0.0025 per document, tied directly to the work done. This endpoint is in deployment and not yet accepting live jobs; it will be available soon, so check current endpoint status before wiring it into a production pipeline.
What you can do with it
Unlock invoices before automated data extraction
Decrypt a batch of password-protected supplier invoices so a downstream extraction tool can actually read their contents instead of failing on every file.
Prepare protected statements for merging
Remove the password from monthly encrypted account statements before combining them into a single consolidated report.
Migrate legacy encrypted archives to a new system
Decrypt an old archive of password-protected PDFs before importing it into a document management platform that only accepts unencrypted files.
Free a document for further pipeline processing
Unlock a protected PDF as the first step before compressing, splitting or filling forms in it, so the password stops being a manual bottleneck in the workflow.
FAQ
How do I remove a password from a PDF using an API?
Send the encrypted file along with its current password to POST /pdf/unlock, which returns a task_id right away. The decrypted PDF arrives by webhook or signed link once processing completes.
Is the remove PDF password API free?
There's no free tier — free tiers get abused and slow everyone down. Access runs on a prepaid ForHosting KIT balance: top up from $10.00 (it never expires) and each request is charged at its published price, so a call with no balance returns HTTP 402. No subscription, no tokens, no invented credits, and a failed task is never charged.
Do I need to know the PDF's password to use this?
Yes. This endpoint decrypts a PDF you already have lawful access to and know the password for; it does not attempt to crack, guess or bypass a password you don't know.
Does removing the password change the document's content?
No. Pages, text, images and formatting stay identical to the original; only the encryption and password requirement are removed.
Can I unlock PDFs in bulk?
Yes. Each request is an independent asynchronous task, so once live, a batch of encrypted documents can be submitted in parallel and collected by webhook.
Does this work with any PDF encryption version?
It decrypts according to the standard PDF encryption method the file was protected with, using the password you supply for that document.
Is this endpoint live right now?
It is currently in deployment and not yet accepting jobs; it will be available soon. Check current endpoint status before integrating it into a production pipeline.
How is the cost calculated for a large batch?
Each request costs a flat $0.042 plus $0.0025 per document processed, so total cost scales predictably with the number of files unlocked.
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, and soon from our app, email and Telegram.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/pdf/unlock \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"pdf":"https://ejemplo.com/documento.pdf"}'const res = await fetch("https://api.kit.forhosting.com/pdf/unlock", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"pdf": "https://ejemplo.com/documento.pdf"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/pdf/unlock",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"pdf": "https://ejemplo.com/documento.pdf"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/pdf/unlock", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"pdf":"https://ejemplo.com/documento.pdf"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"pdf":"https://ejemplo.com/documento.pdf"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/pdf/unlock", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"pdf": "https://ejemplo.com/documento.pdf"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "pdf.unlock",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Limits
max_mb | 25 |
max_pages | 200 |
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
413 | input_too_large | The file exceeds the size limit. |