How to Encrypt Files Before Uploading to Cloud on Mac
Encrypt files before uploading to cloud Mac guide: compare disk images, vaults, zip and Finderlock, so iCloud, Dropbox or Google Drive only store ciphertext.
To encrypt files before uploading to the cloud on a Mac, put them in a password-protected encrypted container on your own machine and sync only that container. The provider then stores ciphertext it has no key for. macOS can do this with an encrypted disk image, and apps such as vault tools or Finderlock do it per file or folder.
Client-side vs provider-side encryption
Most cloud services already encrypt your data in transit and on their servers. That is provider-side encryption. The provider holds the keys, so it can decrypt your files to run search, previews, sharing links, virus scans, account recovery, or to respond to legal requests. A stolen password or a compromised account can expose the readable files.
Client-side encryption means you encrypt on your Mac before the sync client sees the file. What leaves your machine is ciphertext. The provider can store, copy and version it, but it cannot read it. The trade-off is that you own the key. If you lose the password, nobody can get the data back, including the provider and the app vendor.
What about iCloud?
Apple offers an opt-in feature called Advanced Data Protection for iCloud, which extends end-to-end encryption to more categories of iCloud data. It requires you to set up your own recovery method. Which data types are covered, and what each Apple account and device requirement is, has changed over time, so check Apple's current support documentation instead of relying on a summary here. Without it, assume Apple holds some of the keys.
For Dropbox and Google Drive, assume the provider can read your files unless you encrypt them first. Some business plans offer extra controls, so check your plan's documentation.
Even with Advanced Data Protection on, encrypting first still helps if you also use Dropbox or Google Drive, or want one method that works the same everywhere.
Option 1: Encrypted disk image (built into macOS)
Disk Utility can wrap a folder in an AES-256 encrypted .dmg. It is free, already installed, and the encryption is sound. Its weakness is sync behavior: a regular disk image is one big file. Change one document inside and your sync client re-uploads the entire image.
- Open Disk Utility (Applications > Utilities).
- Choose File > New Image > Image from Folder.
- Select the folder you want to protect and click Choose.
- Set Encryption to 256-bit AES and enter a password when prompted.
- Set Image Format. Compressed is smaller but read-only. Read/write lets you add files later.
- Save the
.dmg, then move it into your iCloud Drive, Dropbox or Google Drive folder.
The Terminal equivalent creates a compressed, encrypted image and prompts for the password:
hdiutil create -srcfolder ~/Documents/Taxes -volname Taxes -fs APFS -format UDZO -encryption AES-256 ~/Desktop/Taxes.dmg
This only reads the source folder and writes a new file. It does not delete anything.
If macOS offers to remember the password in your keychain when you mount the image, that is convenient on your own Mac, but you still need the password on any other device.
Sparse bundles sync better
If you want a read/write vault you will edit often, use a sparse bundle instead. It stores data as many small "band" files inside a package, so a change usually touches only some bands. In Disk Utility, use File > New Image > Blank Image and pick sparse bundle disk image as the format, with AES-256 encryption. In Terminal:
hdiutil create -size 5g -type SPARSEBUNDLE -fs APFS -encryption AES-256 -volname Vault ~/Vault.sparsebundle
How well a given provider handles a bundle with thousands of band files varies, and I would not trust any claim about it without testing. Eject the volume before the sync client runs, and make sure the sync finishes before you rely on it. Neither image type opens natively on Windows.
Option 2: Vault apps
Vault-style tools such as Cryptomator create a folder where each file is encrypted separately, and they present the contents as a virtual drive while unlocked. Because files are encrypted individually, a small edit means a small upload. They have desktop apps for several operating systems, which makes them the strongest choice if you also use Windows or Linux. The cost is installing and learning another tool, and keeping the app available on every device that needs access. Password recovery depends on the app, so check what yours offers before you depend on it.
Option 3: Password-protected zip
A zip is the lowest-effort option and opens almost everywhere, but the details matter. The classic zip -e command uses a legacy scheme that is weak by modern standards, and the Finder's built-in Compress has no password option. If you go this way, use a tool that writes AES-encrypted archives and a long, unique password. Our guide to password-protecting a zip file on Mac covers the caveats. For a broader comparison, see 4 encryption options compared.
Option 4: Finderlock (one encrypted container per item)
Finderlock is a macOS app that encrypts each protected file or folder into its own .secured container using AES-256-GCM (Apple CryptoKit). Folders are archived first and sealed in independent 4 MB chunks. The key comes from your password through PBKDF2-HMAC-SHA256 with 150,000 iterations and a random 32-byte salt. It does not use disk images or sparse bundles, so the file in your synced folder is already encrypted and you do not mount or eject anything.
- Install Finderlock from finderlock.com. It needs macOS 13.5 or later. The Finder right-click menu needs macOS 14.
- Right-click a file or folder and choose Protect, or drag it into the dashboard or menu bar app.
- Set a password for the item, or use Touch ID on paid plans. The password is stored in your macOS Keychain.
- Check that the item shows as locked. A placeholder file stays at the original location, and double-clicking it unlocks the item.
- Let your sync client upload the encrypted container.
A few practical points:
- Unlocked means plaintext. While an item is unlocked, its contents are readable on disk, and a sync client can upload them. Lock it before sync runs. Auto-lock on inactivity or sleep helps, and lock-on-close detects when the app that opened the file quits.
- A folder is one container. Changing something in a protected folder changes that container. I would not assume a provider uploads only the changed part, so protect large, frequently edited folders as smaller items if upload size matters to you.
- Backups. Finderlock can back up encrypted containers to iCloud and Google Drive, and it has a recovery tool that uses the master password.
- Lost passwords are final. Finderlock cannot recover a forgotten item password. Keep it in a password manager as well.
Finderlock is macOS only, so it will not help if you need to open files on Windows or Android. See the docs for setup details and security for how the encryption works.
Comparison of the options
| Option | Setup effort | Syncs well | Cross-platform | Password recovery |
|---|---|---|---|---|
| Provider-side only | None | Yes | Yes | Via your account (the provider holds keys) |
| Encrypted disk image (.dmg) | Low, built in | Poorly: whole file re-uploads | Mac only | None |
| Sparse bundle | Medium (Terminal or Blank Image) | Better, but test your provider | Mac only | None |
| Vault app (Cryptomator-style) | Medium, install an app | Yes, per-file encryption | Yes, desktop and some mobile | Depends on the app |
| Password zip | Low | Poorly for large archives | Yes, with an AES-capable tool | None |
Finderlock .secured |
Low | Container is already encrypted; folders are one container | No, macOS only | None for item passwords |
Checklist before you trust it
- Encrypt first. Create the encrypted container before the file goes into a synced folder.
- Delete the plaintext original. Only after step 3 works.
- Test on another device. Download the encrypted file from the cloud and open it with the password. For a
.dmg, you can also runhdiutil imageinfoon it and look for the encryption line. - Back up the password. Use a password manager or another safe place. Without it, the data is gone.
Warning: Deleting the original is irreversible once you empty the Trash, and the container is useless without its password. Do this last. Also note that on SSDs, deleting a file does not guarantee the old blocks are overwritten, which is another reason to encrypt before the file ever syncs.
FAQ
Does iCloud Drive encrypt my files?
Yes, in transit and on Apple's servers. By default Apple holds some of the keys. Advanced Data Protection is an opt-in setting that extends end-to-end encryption. Check Apple's documentation for what it covers today.
Is Dropbox or Google Drive end-to-end encrypted?
Not by default for personal accounts, as far as I know. Check each provider's current documentation, and encrypt locally if you want to be sure.
Can I just put a password on a zip file?
You can, but the encryption method matters. Legacy zip encryption is weak, so use AES and a strong password. See the zip post linked above.
What happens if I forget the password?
For properly client-side encrypted files, the data cannot be recovered. That applies to disk images, zips and Finderlock item passwords.
Will an encrypted disk image sync efficiently?
A regular .dmg is one file and re-uploads fully after changes. A sparse bundle splits data into bands and is usually better, but test it with your provider.
Next step
Pick the option that fits your devices. If you work only on Mac and want each file or folder encrypted on its own, try Finderlock. The free plan covers 3 protected items, enough to test the full flow, including opening a container on a second Mac. Start at finderlock.com. You can also compare alternatives in best Mac encryption apps.