PDF加密/解密

为PDF设置密码保护或移除密码保护

拖拽PDF文件到此处,或点击选择

最大文件大小:128 MB

所有处理均在浏览器本地完成,文件不会上传到服务器。

用密码加密 PDF — 浏览器端 AES-256 保护

Add password protection to any PDF using AES-256 encryption, the strongest commercially-available PDF encryption. Your PDF stays in your browser during the encryption process — only the encrypted result leaves your device when you save. No upload, no sign-up, no daily limits.

100% FreeNo UploadNo Sign-upAES-256 Encryption

使用步骤

  1. Drop Your PDF: Drag any PDF in. Already-encrypted PDFs are detected — decrypt first if needed using our Unlock tool, then re-encrypt with new credentials.
  2. Choose Encryption: Pick algorithm: AES-256 (recommended, strongest) or AES-128 (broader compatibility). Set a strong password (we don't enforce complexity rules, but recommend 12+ characters with mixed case, numbers, symbols).
  3. Set Permissions: Optional: restrict actions on the PDF even with the password. 'Restrict printing', 'Restrict copying of text', 'Restrict modifications' — these are honored by compliant readers like Adobe and Preview.
  4. Encrypt & Save: Click 'Encrypt'. pdf-lib + the Web Crypto API encrypt the PDF in your browser. Saves as a new file with the encryption metadata. The original PDF is untouched.

为什么选择此工具

  • 100% Local Processing: Files are processed entirely in your browser using JavaScript — never uploaded to any server.
  • No Limits: No file count or file size restrictions. Process as many files as your device can handle.
  • No Sign-up: Free forever, no account needed, no email required. Open the page and start.
  • Private by Design: Nothing is sent to any server. Close the tab and your files are gone forever.

常见问题

How do I add a password to a PDF?

Drop your PDF into our PDF Encrypt tool, choose encryption strength (AES-256 recommended), set a strong password, optionally restrict permissions (printing, copying, modifying), and click 'Encrypt'. The encrypted PDF downloads with your password required to open. Everything happens in your browser — no upload.

Is AES-256 strong enough for commercial use?

Yes. AES-256 is the strongest PDF encryption standard, used by banks, government agencies, and Fortune 500 companies. As of 2026, no practical attack exists. Combined with a strong password (12+ mixed characters), AES-256 encryption provides protection sufficient for confidential commercial documents, legal filings, and medical records.

Can recipients open the encrypted PDF in any reader?

Yes — AES-encrypted PDFs are universally supported. Adobe Acrobat, Preview (macOS), Chrome PDF viewer, mobile PDF apps, and all major readers open these files with the correct password. AES-128 has slightly broader compatibility but slightly weaker protection; AES-256 is preferred for new documents.

Will my PDF be uploaded?

No. Encryption runs entirely in your browser via pdf-lib and the Web Crypto API. The decrypted PDF and your password never leave your device — only the encrypted result saves locally. Even if you lose your password, the original is gone (since it was never uploaded).

Can I set different passwords for opening vs. editing?

Yes. PDF encryption supports two passwords: an 'open password' (required to view the document) and an 'owner password' (controls editing/printing/copying permissions). Most users just need the open password. For sensitive documents where you want recipients to view but not edit without permission, set both.

What happens if I forget the password?

Our tool cannot recover forgotten passwords — neither can anyone else, given proper AES-256 encryption. This is by design (for your security). If you forget the password, the encrypted PDF is effectively inaccessible. Always store the password in a password manager or write it down in a secure location.

PDF 加密的其他用法

本场景的赞助工具

推广 热门

NordPass

给 PDF 加上密码后,把密码存在 NordPass,再也不用自己记。

强密码如果存在记事本里就失去了意义 — 密码管理器可以加密存储并自动填充。

了解更多