Español

Lee este artículo en español.

How to add (and remove) a password on a PDF

You're about to send a PDF with sensitive data by email (a payslip, a contract, personal data) and you want only whoever has the password to be able to open it. Or it's the other way round: you have a protected PDF that doesn't need to be protected anymore, and you want to remove the password so it opens without asking for anything. Both cases are the same piece seen from either side, and on Cofferdock they're two separate tools.

One important clarification before going further: this is for adding or removing a password that you already know. If you have a protected PDF and don't know what the password is, this isn't what you're looking for: there's no reliable way to "crack" a PDF password you don't know, and this tool doesn't attempt it.

Adding a password to a PDF

With Protect PDF you send the PDF (as a file or as JSON) along with the password that will be required to open it from now on. It uses AES 256-bit encryption, the recommended security standard. Not a symbolic lock, but the same level of encryption used to protect sensitive data in most serious systems.

One detail worth knowing: if the PDF you send already has a password on it, you can't put another one directly on top: the tool rejects it with an error. You need to remove the current password first (next section) and then, if you want, set a new one.

The response can be the raw PDF or a JSON with the file encoded inside, depending on what you prefer. Each call costs 1 credit.

Removing a PDF's password

With Remove password you do the reverse: you send the PDF along with its password, but here it's the document's current password, not a new one: this tool doesn't set passwords, it only removes the one already there.

If you get the password wrong, the tool responds with an error saying the password is incorrect and, importantly, the credit is refunded automatically. A failed attempt from a mistyped password isn't charged, so you can retry without worrying about burning extra credits. Only 1 credit is deducted when the attempt succeeds.

Just like with Protect PDF, the output can be the raw binary or a JSON with the PDF encoded inside, depending on what you need.

When to use which

If the PDF is going to travel by email or get shared outside your organization and it contains something not everyone should see, protect it before sending. If the PDF already served its protected purpose (say, the right person already received it and now you need to archive it or reuse it internally without every opening asking for a password), remove it. And if you need to change a password to a new one, it's two steps: remove the current one first, then set the new one.

FAQ

Can I change one password for another in a single call? Not directly. First remove the current password with Remove password, and with the now-unprotected PDF, set the new one with Protect PDF.

If I mistype the password when removing it, do I lose the credit? No. If the password is incorrect, the call fails and the credit is refunded automatically. You're only charged when the password is correct and the PDF gets unprotected.

How secure is the password Protect PDF sets? It uses AES 256-bit encryption, the industry-recommended standard. The real-world security also depends on choosing a password that isn't trivial to guess.

Can I remove a PDF's password if I don't know it? No. This tool needs the current password in order to remove it. There's no feature to bypass or guess a password you don't know.

Try these tools

You'll find the full documentation for Protect PDF and Remove password, with examples for n8n, Make and your own code. And if you don't have an account yet, you can create one for free.