Your own .pfx certificate · incremental update · earlier signatures stay valid

PDF Digital Signature (PAdES)

Add a cryptographic signature to a PDF with a certificate you already hold. The key is used once in this tab and discarded, the signature is appended after the existing bytes, and the result is re-checked before you download it.

1. The PDF

Choose the PDF to sign

Up to 100 MB; password-protected PDFs need Unlock PDF first

2. Signing certificate

Used in this tab only. Neither the file nor the password is stored.

Choose the .pfx or .p12 file

Modern AES-protected files

3. Signature options

PDF Digital Signature (PAdES)

Operator: Abdulla Al Fahad. How tools are built and checked

A drawn signature image proves nothing: anyone can copy it onto another document. A digital signature is different, because it is a hash of the file's bytes signed with a private key, so a reader can tell whether a single byte changed after signing. This page applies that kind of signature using a certificate you already own, either a .pfx/.p12 file or a PEM key with its certificate.

The file is never rewritten. The page copies your PDF byte for byte, appends a signature field, the signature itself and a new cross-reference section, and patches the offsets in last. Signatures that were already in the file keep covering exactly the bytes they covered before.

Key features

  • Two signature formats: PAdES (ETSI.CAdES.detached, with a signing-certificate-v2 attribute) and the older adbe.pkcs7.detached that very old readers expect
  • RSA PKCS#1 v1.5 and ECDSA (P-256, P-384, P-521) certificates, with SHA-256, SHA-384 or SHA-512 as the digest
  • Optional visible stamp on any unrotated page: name, UTC time, reason and location, with an optional PNG or JPEG image, placed in a chosen corner
  • Certification signatures with DocMDP level 1, 2 or 3, and ordinary approval signatures that can be added by later signers as Signature2, Signature3 and so on
  • After signing, the page re-opens its own output and reports whether the digest matches, the signature verifies and the signature covers the whole file

What the signature contains and what readers will say about it

A PDF signature has two halves. The signature dictionary names a /ByteRange, four integers that mark the stretch before the signature value and the stretch after it, and holds the CMS SignedData blob as a hex string in /Contents. Because the blob sits inside the bytes it signs, the page first writes a placeholder of fixed width, fixes the ByteRange around it, hashes the two covered stretches and writes the finished CMS into the placeholder without changing any length. The placeholder is the size of a trial signature plus 512 bytes, rounded up to a multiple of 1,024.

In PAdES mode the CMS carries three signed attributes: content type, message digest, and the signing-certificate-v2 attribute that pins the signer's certificate by its SHA-256 hash and issuer/serial. The signing time goes in the dictionary's /M entry, not in the CMS. PAdES files below PDF 2.0 also get the ESIC developer extension in the catalog. In legacy mode the CMS carries a fourth signed attribute, the signing time.

The result is a PAdES baseline B-B signature: no trusted timestamp and no embedded revocation data. A timestamp needs a call to a time-stamping authority, which this page does not make, so B-T and B-LT are out of reach here. Embedded are your certificate and any intermediates, but not a self-signed root.

How it works

The PDF is parsed to find its catalog, the chosen page, the AcroForm and the last cross-reference section. Only objects that must change are rewritten: the catalog, the page, and any array or form dictionary that was stored as a separate object. Their new versions, plus the new objects for the widget, the stamp appearance and the signature, are appended. If the file's last cross-reference section was a table the update uses a table; if it was a stream, a stream.

The key is imported into the browser's Web Crypto as non-extractable and used once. After signing, the key, password and certificate are dropped from the page's state.

Common use cases

  • A freelance translator holds an S/MIME certificate from her email provider. She signs the 12-page delivery PDF with it, so the client's reader can show that the file has not changed since she sent it.
  • A facilities manager certifies a 3-page inspection form with DocMDP level 2. The contractor can still fill in the form fields and add his own signature, but any other edit makes the certification show as violated.
  • A small firm uses an internal CA to issue staff certificates. Two partners sign the same engagement letter one after the other, each with an approval signature, and the second revision leaves the first signature valid.

How to use this tool

  1. Choose the PDF; the page count and the number of earlier signatures appear.
  2. Choose the .pfx or .p12 file and its password, or paste the key and certificate as PEM, then press Read the certificate to see who it names and when it expires.
  3. Pick the format, digest and kind of signature, and fill in the name, reason and location you want recorded.
  4. Tick Show the signature on a page if you want a visible stamp, and choose the page and corner.
  5. Press Sign and download. The signed file downloads and its own check appears below.

Example

A two-page PDF and an RSA-2048 certificate issued by a private test authority

Format PAdES, digest SHA-256, approval signature, invisible, reason "I approve (v1)"

Signature field and self-check

Field Signature1, ByteRange 0 1515 5613 549 in a 6,162-byte file. The CMS is 1,509 bytes in a 2,048-byte reserved space. The check shows digest matches, signature valid, covers the whole file. Signing the result again with a second certificate adds Signature2, and the first signature then reports that it covers an earlier revision.

Tips for best results

  • Choose DocMDP level 1 only for documents that will never be filled in or countersigned. Level 1 makes any later signature break the certification.
  • Use SHA-384 or SHA-512 with a P-384 or P-521 ECDSA key so the digest strength matches the key. A SHA-256 digest on a P-521 key is legal but wastes the key.
  • Fill in Reason for approval signatures; readers show it in the signature panel, which helps when three people sign the same file.

Common pitfalls

A certificate you made yourself, or one from a private authority, is shown by readers as untrusted until the recipient adds it to their trusted list. The signature is still cryptographically intact; only the identity is unconfirmed.

PKCS#12 files protected with RC2 or triple-DES (older Windows exports and OpenSSL's -legacy mode) are detected but not opened. The error message gives the OpenSSL command that converts one to PEM.

Encrypted PDFs are refused, because an appended signature in an encrypted file would need encrypted objects. Remove the password with Unlock PDF first.

Anyone who changes the file after signing breaks the signature, and a viewer that re-saves it removes it. Pass the signed file along unopened.

Common errors and how to fix them

"The password did not open this certificate file (its integrity check failed), or the file is damaged."
Retype the password, noting that .pfx passwords are case-sensitive. If it is correct, the file may be truncated; export it again from where it came from.
"A certification signature must be the first signature in a document."
A PDF can carry only one certification signature and it must come first. Choose Approval signature, or start from an unsigned copy.
"This certificate has expired."
A signature made with an expired certificate is flagged by every reader. Renew the certificate; the page will not sign with one.
"None of the certificates matches the private key."
The key and the certificate come from different pairs. Export them together, or check that the PEM text holds the certificate issued for this very key.
"That page is rotated."
A visible stamp is placed on the unrotated page grid. Choose a page whose rotation is 0, or sign invisibly.

Best practices

  • Send the signed file as it is and let the recipient open it in a reader that shows the signature panel; ask them to add your certificate to their trust list once if it is self-issued.
  • Keep a copy of the unsigned original; a certification signature cannot be removed from a signed copy without invalidating it.

What this signature is and is not

It is a cryptographic signature with the structure that PDF readers expect: a /ByteRange, a detached CMS SignedData blob and a signing-certificate-v2 attribute in the PAdES mode. OpenSSL's CMS verifier accepts it, and so does this site's Verify PDF Signature page. Readers differ in how they treat self-issued certificates and in what they show, so confirm the behaviour with your own recipients.

It is not a qualified electronic signature under eIDAS. A qualified signature needs a qualified certificate and a qualified signature-creation device, and a .pfx file on a laptop is neither. Whether a given signature is enough for a contract is a question about your jurisdiction and your counterparty, not about this tool.

Frequently asked questions

I only want my handwritten signature on the page. Is this the right tool?

No. The Sign PDF page places a drawn, typed or uploaded signature image, which proves nothing about the file's contents. This page makes a cryptographic signature that readers can check, and it needs a certificate you already hold.

Why does Acrobat say the signature validity is unknown?

Readers such as Acrobat typically say this when the signature is intact but the certificate does not chain to a root they trust. For a self-signed certificate that is expected. The recipient can mark the certificate as trusted, or you can sign with a certificate from a public authority.

What is the difference between PAdES and adbe.pkcs7.detached?

Both are detached CMS signatures over the same ByteRange. PAdES (the ETSI.CAdES.detached sub-filter) pins the certificate with a signing-certificate-v2 attribute and takes the signing time from the dictionary, which is what European validators check. adbe.pkcs7.detached is the older Adobe form and includes a signing-time attribute in the CMS.

Can I add a trusted timestamp?

Not here. A timestamp needs a request to a time-stamping authority over the network. The page therefore produces B-B signatures. Anyone holding the file can later add a timestamp or validation data as a further revision in a tool that talks to a TSA.

What happens to signatures that are already in the file?

They stay valid, because the page appends and never rewrites. The verifier will report that each earlier signature covers an earlier revision of the file, which is correct and expected. A file certified at DocMDP level 1 is refused, since any addition would break it.