Unlock PDF API
Remove Passwords and Encryption from PDF Files Programmatically.
 
                    Code Examples in Popular Languages
Integrate our Unlock PDF API easily into your apps with comprehensive code examples in popular languages to get started quickly.
curl --location 'https://theonlineconverter.com/api/v1/unlock-pdf' \
--header 'Content-Type: application/json' \
--header 'x-api-key: enter_your_api_key' \
--form 'file=@"/D:/laragon/www/new-toc/public/api-uploads/locked.pdf"' \
--form 'password="123"'const myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
myHeaders.append("x-api-key", "enter_your_api_key");
const formdata = new FormData();
formdata.append("file", fileInput.files[0], "/D:/laragon/www/new-toc/public/api-uploads/locked.pdf");
formdata.append("password", "123");
const requestOptions = {
  method: "POST",
  headers: myHeaders,
  body: formdata,
  redirect: "follow"
};
fetch("https://theonlineconverter.com/api/v1/unlock-pdf", requestOptions)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.error(error));import requests
import json
url = "https://theonlineconverter.com/api/v1/unlock-pdf"
payload = {'password': '123'}
files=[
  ('file',('locked.pdf',open('/D:/laragon/www/new-toc/public/api-uploads/locked.pdf','rb'),'application/pdf'))
]
headers = {
  'Content-Type': 'application/json',
  'x-api-key': 'enter_your_api_key'
}
response = requests.request("POST", url, headers=headers, data=payload, files=files)
print(response.text)import requests
import json
url = "https://theonlineconverter.com/api/v1/unlock-pdf"
payload = {'password': '123'}
files=[
  ('file',('locked.pdf',open('/D:/laragon/www/new-toc/public/api-uploads/locked.pdf','rb'),'application/pdf'))
]
headers = {
  'Content-Type': 'application/json',
  'x-api-key': 'enter_your_api_key'
}
response = requests.request("POST", url, headers=headers, data=payload, files=files)
print(response.text)<?php
$client = new Client();
$headers = [
  'Content-Type' => 'application/json',
  'x-api-key' => 'enter_your_api_key'
];
$options = [
  'multipart' => [
    [
      'name' => 'file',
      'contents' => Utils::tryFopen('/D:/laragon/www/new-toc/public/api-uploads/locked.pdf', 'r'),
      'filename' => '/D:/laragon/www/new-toc/public/api-uploads/locked.pdf',
      'headers'  => [
        'Content-Type' => '<Content-type header>'
      ]
    ],
    [
      'name' => 'password',
      'contents' => '123'
    ]
]];
$request = new Request('POST', 'https://theonlineconverter.com/api/v1/unlock-pdf', $headers);
$res = $client->sendAsync($request, $options)->wait();
echo $res->getBody();OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM)
  .addFormDataPart("file","/D:/laragon/www/new-toc/public/api-uploads/locked.pdf",
    RequestBody.create(MediaType.parse("application/octet-stream"),
    new File("/D:/laragon/www/new-toc/public/api-uploads/locked.pdf")))
  .addFormDataPart("password","123")
  .build();
Request request = new Request.Builder()
  .url("https://theonlineconverter.com/api/v1/unlock-pdf")
  .method("POST", body)
  .addHeader("Content-Type", "application/json")
  .addHeader("x-api-key", "enter_your_api_key")
  .build();
Response response = client.newCall(request).execute();package main
import (
  "fmt"
  "bytes"
  "mime/multipart"
  "os"
  "path/filepath"
  "net/http"
  "io"
)
func main() {
  url := "https://theonlineconverter.com/api/v1/unlock-pdf"
  method := "POST"
  payload := &bytes.Buffer{}
  writer := multipart.NewWriter(payload)
  file, errFile1 := os.Open("/D:/laragon/www/new-toc/public/api-uploads/locked.pdf")
  defer file.Close()
  part1,
         errFile1 := writer.CreateFormFile("file",filepath.Base("/D:/laragon/www/new-toc/public/api-uploads/locked.pdf"))
  _, errFile1 = io.Copy(part1, file)
  if errFile1 != nil {
    fmt.Println(errFile1)
    return
  }
  _ = writer.WriteField("password", "123")
  err := writer.Close()
  if err != nil {
    fmt.Println(err)
    return
  }
  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, payload)
  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("Content-Type", "application/json")
  req.Header.Add("x-api-key", "enter_your_api_key")
  req.Header.Set("Content-Type", writer.FormDataContentType())
  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()
  body, err := io.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}var options = new RestClientOptions("https://theonlineconverter.com")
{
  MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/api/v1/unlock-pdf", Method.Post);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("x-api-key", "enter_your_api_key");
request.AlwaysMultipartFormData = true;
request.AddFile("file", "/D:/laragon/www/new-toc/public/api-uploads/locked.pdf");
request.AddParameter("password", "123");
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);Key Features & Capabilities
Our API provides a secure and efficient way to manage PDF permissions and remove encryption.
 
                                        Effective Password Removal
Successfully removes both "user" (open) and "owner" (permissions) passwords from a PDF, provided the correct password is supplied.
 
                                        Full Permission Unlocking
Removes all document restrictions, enabling actions like printing, copying text and images, form filling, and content editing on the output file.
 
                                        Supports Standard Encryption
Capable of decrypting PDFs secured with standard encryption algorithms, including 128-bit RC4 and 256-bit AES.
 
                                        Automated Decryption
Integrate into your systems to automatically unlock batches of PDFs that you have the credentials for, streamlining content processing pipelines.
 
                                        Error Handling
The API provides a clear error response if an incorrect password is provided, allowing your application to handle authentication failures gracefully.
 
                                        Secure & Confidential
All files and passwords are sent over encrypted connections. We never log or store your passwords, and files are permanently deleted after processing.
Frequently Asked Questions
Find answers to common questions about our Unlock PDF API to understand its function and security.
 
                

























 
                                     
                                     
                                     
                                     
                                         
                                         
                                         
                                         
                                         
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                 
                 
                    