Lock a document

Add a file-open password to supported PDFs, DOCX and XLSX files and learn how to share the protected copy responsibly.

Upload documentUP TO 15 MiB

Read the instructions below, then choose a supported file.

Lock a document adds a password required to open a supported PDF, DOCX or XLSX file. This is useful when you need to send a reading copy or workbook through a channel where an attachment might be forwarded accidentally. Password protection is one part of safe sharing; it does not verify the recipient, stop an authorised reader taking screenshots or replace your organisation's document-handling rules.

How to lock your file

  1. Prepare the final document. Finish conversion or compression first. Use an unencrypted PDF, DOCX or XLSX no larger than 15 MiB. PDFs can contain up to 300 pages; signed or unsupported files may be rejected.
  2. Choose a new password. Enter and confirm a password of 8–128 characters, subject to the PDF format's encoded-length limit. Use a strong unique passphrase and store it securely; AllDoc cannot recover it.
  3. Create the protected copy. Start the operation and wait for the output. Save the download promptly under a filename that distinguishes it from the original.
  4. Test before sharing. Close and reopen the downloaded file in a compatible reader. Confirm that the new password works, then share that password through a separate appropriate channel.

Protection and compatibility

For PDFs, AllDoc applies AES-256 file-open encryption. Modern Office files use the supported Office encryption workflow. Older viewers may not support every encryption format, so testing with the recipient's application can prevent a last-minute access problem. Legacy DOC and XLS files must first be saved as DOCX or XLSX if you want to lock them here.

A file-open password is different from worksheet protection or restrictions on editing a document. It controls access to the encrypted file contents in a compatible application. Once a legitimate reader opens the file, they can still reproduce information they are authorised to see. A visible watermark can communicate handling expectations, but it is not an access control.

A practical sharing workflow

Suppose a small organisation needs to send a personal report to its intended recipient. First verify the recipient address and remove information that is unnecessary for the purpose. Create the password-protected copy and test it. Send the document through the approved channel, then communicate the password separately. Keeping both in the same message reduces the usefulness of password protection if that message is misdirected.

Keep an original or another recoverable authorised copy in your own secure storage. Do not rely on a temporary conversion site as your archive, and do not use a password you also use for email or banking. If your organisation requires a managed sharing platform, access expiry or audit logs, use that system instead of assuming an encrypted attachment provides those features.

Upload privacy and retention

Locking a file online sends the source document and the password you enter to the processing service over HTTPS. The resulting document is encrypted, but the service necessarily handles the source while creating it. This is not end-to-end encryption against the processor. Decide whether online processing is suitable for the document before uploading.

AllDoc processes files temporarily. Ordinary download results remain in server memory for up to five minutes and may expire earlier during capacity cleanup or a restart. The original on your device remains unchanged. The Privacy Policy explains the full handling details. Use Unlock a document only when you know the correct password and are authorised to create an unlocked copy.

Questions about this tool

Can AllDoc recover a password I forget?

No. Keep your password in an appropriate password manager or other secure recovery arrangement. Before deleting any original, confirm that the protected copy opens and that you can retrieve the password independently of the temporary download page.

Does locking a PDF preserve a digital signature?

Rewriting a signed PDF can invalidate its signature. Supported signed PDFs are therefore rejected. Obtain an appropriate unsigned source or use a workflow designed for the signing and encryption requirements of the issuing organisation.

Why is a long PDF password rejected?

PDF encryption has an encoded-byte limit as well as the interface’s character limit. Some characters use several UTF-8 bytes. Choose a shorter strong passphrase if the encoded password exceeds the supported PDF limit, then test the resulting file.

Should I lock the file before compressing it?

Usually complete ordinary editing, conversion and compression before adding the final file-open password. Other tools may reject encrypted input. Applying protection as the final step also makes it easier to test exactly the copy you intend to share.

← Choose another document tool · Practical guides

Open dedicated page ↗