How to Unlock a PDF on Mac
macOS has three native ways to strip protection from a PDF: Preview, Terminal, and Automator. Each one works under very specific conditions. Before you spend time on any of them, it helps to understand what kind of lock you are dealing with, because almost every built-in Mac tool assumes you already know the password.
Important distinction before you begin
Mac-native tools remove restrictions from a PDF you can already open. They do not crack unknown open passwords. If Preview refuses to display the file at all until you type a password, none of the built-in methods on this page will help without that password. See the owner vs open password guide for the technical difference.
Method 1: Preview.app "Export as PDF" trick
Preview is built into every modern version of macOS. It can open any PDF you have the password to, and it has a quiet superpower: when you re-export an opened document, the new copy is saved without the original restrictions. This is the cleanest way to get rid of "cannot print" or "cannot copy text" flags on a document you already have authorization for.
Step-by-step with Preview
- Double-click the PDF. Preview should be the default handler.
- Type the open password if prompted. You must get past this step.
- Go to File → Export (not "Export as PDF" in Big Sur and later — it auto-picks PDF).
- In the dialog, make sure the format is PDF and leave the encryption checkbox unchecked.
- Save to a new filename. The exported copy has no restrictions.
This procedure is strictly for removing printing, copying, and editing restrictions. It does not break the open password. In other words, Preview's export trick relies on the fact that macOS has already decrypted the document in memory the moment you typed the password. You are just saving a fresh, unrestricted copy of what is already on your screen.
If you are working with a batch of files, Preview's one-at-a-time export becomes tedious. That is where Automator and Terminal take over.
Method 2: Terminal with qpdf
qpdf is a command-line PDF manipulation tool that macOS does not ship with by default. It is trivial to install through Homebrew and gives you precise, scriptable control over decryption. If you are already comfortable in Terminal, this is usually the fastest and most reliable route for known-password removal.
Install and run qpdf
# Install Homebrew if you do not have it yet /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" # Install qpdf brew install qpdf # Decrypt a single PDF (replace YOURPASSWORD) qpdf --password=YOURPASSWORD --decrypt input.pdf output.pdf # Strip restrictions only from a file that is already open-accessible qpdf --decrypt input.pdf output.pdf
The --decrypt flag produces a copy with no password or restrictions. If the source has an open password, you must pass it with --password=. If the source only has owner restrictions, qpdf strips them without any password at all, because PDF owner passwords are enforced by the viewer, not by the cipher itself. This is the same reason Preview's export trick works.
qpdf will not brute-force an unknown password. It simply returns an error. That is a deliberate design choice: qpdf is a file manipulation tool, not a cracker. For that job, you need a GPU-accelerated service. Our recovery guide explains what is realistic.
Method 3: Automator workflow for batch processing
If you have a folder of PDFs all protected by the same known password, Automator lets you build a reusable workflow that combines Finder input with a qpdf Shell Script action. This is the macOS-native way to batch-unlock documents without writing a full Bash script.
Build the workflow
- Open Automator and create a new Quick Action.
- Set "Workflow receives current" to PDF files in Finder.
- Drag the Run Shell Script action into the flow.
- Set "Pass input" to as arguments.
- Use the script below, replacing YOURPASSWORD with the shared password.
- Save the Quick Action as "Unlock PDF". It now appears when you right-click any PDF in Finder.
for f in "$@"
do
out="${f%.pdf}-unlocked.pdf"
/opt/homebrew/bin/qpdf --password=YOURPASSWORD --decrypt "$f" "$out"
doneSelect any number of protected PDFs in Finder, right-click, choose "Unlock PDF", and every file gets an unlocked sibling with the -unlocked.pdf suffix. This is ideal for contract bundles, archival paperwork, or any workflow where you receive batches under a known shared password.
When Print to PDF works (and when it fails)
A very popular trick on forums is to open a restricted PDF in Preview and use File → Print → Save as PDF. People assume this bypasses security. The truth is subtler.
| Scenario | Does Print to PDF work? | Why |
|---|---|---|
| Restrictions only (owner password) | Yes | Preview renders the pages and re-captures them. |
| Open password, but you typed it in | Yes | Document is decrypted in memory; new file has no password. |
| Open password unknown | No | Preview cannot render pages, so there is nothing to re-print. |
| Print-restricted owner password | Sometimes | Preview may disable the Print dialog. Use Export instead. |
| AES-256 encrypted PDF, unknown password | No | No Mac-native tool decrypts AES-256 without the key. |
The confusion usually comes from mixing the two password types. If "Print to PDF" strips protection from your file, it was restrictions, not a true open password. That is useful to know, because it means the same job can be done faster and more cleanly through Preview's Export or qpdf's --decrypt.
Mac-native vs online tools: a fair comparison
| Need | Best Mac-native tool | When to go online |
|---|---|---|
| Remove restrictions, one file | Preview Export | Never. Preview is faster and private. |
| Batch remove known password | Automator + qpdf | Only if you prefer a web UI. |
| Scriptable pipeline | qpdf in Terminal | Never. Local is always faster. |
| Forgotten open password | None | GPU recovery service required. |
| 40-bit legacy PDF, no password | None practical | Guaranteed 40-bit recovery |
macOS is excellent when you know the password. It is useless for true recovery. The hardware is simply not designed for the billions-per-second hash rates that modern GPUs achieve. If the password is unknown, offloading the work to a service with GPU farms is the only realistic option.
Common Mac-specific pitfalls
"Preview keeps re-adding the password"
If you open, edit, and save with Cmd+S instead of Export, Preview preserves the original encryption. Always use File → Export.
"qpdf command not found"
On Apple Silicon Macs, Homebrew installs to /opt/homebrew/bin. Make sure that directory is in your PATH.
"Automator fails silently on some files"
Different files in a batch may use different passwords. Inspect qpdf's exit code in the script and log failures to a file so you can retry them.
"Preview changes my signed PDF"
Re-exporting a digitally signed PDF invalidates the signature. Use qpdf instead, which preserves byte-level content better when only stripping encryption.
Decision shortcut
Know the password → Preview Export or qpdf. Shared password across a batch → Automator. No password and the file will not open → try our free analyzer, then the free password check.
Use only on files you own or are authorized to access
Every method in this guide assumes lawful ownership. If a PDF belongs to your employer, a client, or a government body, confirm you have explicit permission before unlocking it. See the legal guide.