Unlock PDF API – Remove Passwords Programmatically
Remove PDF passwords and restrictions instantly. Unlock protected PDFs for editing, printing, and copying with one API call.
curl -X POST "https://api.xspdf.com/v1/security/unlock" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input_url": "https://files.example.com/locked-contract.pdf",
"options": {
"password": "viewpass123"
}
}' Locked PDFs Block Your Workflow
Legacy Documents
Thousands of old PDFs with forgotten passwords sit in archives. Manual recovery tools are unreliable and slow. Your document workflows grind to a halt.
Broken Automation
Protected PDFs break merge, split, and conversion pipelines. Every locked file requires manual intervention, destroying your automation ROI.
Compliance Bottlenecks
Legal teams need to process encrypted contracts for eDiscovery. Finance needs to extract data from protected invoices. Security reviews delay for weeks.
Hidden Cost
Every locked PDF means manual work. Support tickets pile up. Developers waste time debugging qpdf and Ghostscript commands that fail randomly. Projects miss deadlines because document processing is stuck.
One API Call. Unlocked PDF.
Upload Protected PDF
Pass a URL or base64-encoded locked PDF. We handle password-protected files and permission-restricted documents.
Provide Password
Send the password you know (user or owner). We decrypt and remove all restrictions in one operation.
Get Unlocked PDF
Receive a fully accessible PDF with no passwords, no restrictions. Ready for editing, merging, or conversion.
response = requests.post(
"https://api.xspdf.com/v1/security/unlock",
headers={"Authorization": f"Bearer {API_KEY}"},
json={
"input_url": "https://files.example.com/locked-contract.pdf",
"options": {"password": "viewpass123"}
}
)
unlocked_url = response.json()["output_url"] Powerful Unlocking Features
All Encryption Types
Unlocks 40-bit, 128-bit, and AES-256 encrypted PDFs. Handles both user and owner passwords. No guessing which encryption was used.
Remove All Restrictions
Strips printing restrictions, copy protection, editing locks, and annotation blocks. Output PDFs are fully editable.
Perfect Fidelity
Original content, formatting, fonts, and images are preserved exactly. Only security layers are removed. No quality loss.
Lightning Fast
260ms median response time. Batch process thousands of locked PDFs per hour. No bottlenecks in your document pipeline.
Zero Storage
We don't store your PDFs or passwords. Unlocking happens in memory. Files are deleted immediately after processing.
99.95% Uptime
Multi-region infrastructure with automatic failover. SLA-backed reliability for production workflows that can't wait.
Frequently Asked Questions
Can you unlock PDFs without knowing the password?
No. Password removal requires the correct password. We don't offer password cracking or brute-force services. If you've lost the password, you'll need password recovery software, not an unlocking API.
What's the difference between user and owner passwords?
User passwords control opening/viewing the PDF. Owner passwords control editing, printing, and copying. If you provide either password, we can remove both and unlock the file completely.
Is unlocking PDFs legal?
Yes, if you have legal rights to the document and know the password. Common legal uses include processing your own archived files, workflow automation, and compliance processing. Never unlock documents you don't have permission to access.
Does unlocking damage the PDF?
No. We remove only security layers. The original content, layout, fonts, images, metadata, and form fields remain identical. The unlocked PDF is a perfect copy minus password protection.
What file size limits apply?
Standard plans support PDFs up to 100MB. Enterprise plans support up to 500MB. Unlocking time scales linearly with file size, typically adding 40-80ms per 10MB.
Unlock Your First PDF in Under 5 Minutes
Join 8,700+ teams using xspdf for document automation. Free API key. No credit card required.
Related APIs