How to encrypt a file on Windows, Mac and before you send it

Encrypting a file scrambles it so only someone with the password or key can read it. Windows and macOS both have encryption built in, but it's easy to pick the wrong kind: the most common built-in options protect files on your own computer and do nothing once you send the file to someone. Here's how to encrypt a file on Windows and Mac for free, how to protect PDFs and Office documents, and how to send a file so only the right person can open it.

By the VeilShare team ·

The short answer

On Windows, the free app 7-Zip encrypts files with AES-256 and a password on any edition. Windows' built-in file encryption isn't available on Home. On a Mac, put files in an encrypted disk image with Disk Utility, or password-protect a PDF in Preview. Word, Excel and PowerPoint can encrypt a file under File > Info, with Encrypt with Password.

To send a file securely, use an end-to-end encrypted link or an encrypted archive with the password sent separately. VeilShare encrypts files in your browser for free, up to 3 GB, and your recipient needs nothing but the link.

Which method do you need?

Start with what you're trying to protect the file from, because that decides which kind of encryption works:

Which encryption method to use
What you wantBest methodWho can open it
Send a file that only your recipient can openBest methodAn end-to-end encrypted link, or a 7-Zip archive with a passwordWho can open itAny device
Protect one Word, Excel or PowerPoint fileBest methodEncrypt with Password in OfficeWho can open itWindows and Mac
Protect a PDFBest methodPreview on a Mac, or a 7-Zip archive on WindowsWho can open itWindows and Mac
Keep files private on your own computerBest methodWindows' file encryption (not on Home), or an encrypted disk image on a MacWho can open itThat computer only
Protect everything if your device is stolenBest methodDevice Encryption on Windows, FileVault on a MacWho can open itThat device only

The last two rows are the trap. They protect files while they're on your device, but the moment you copy a file somewhere else or attach it to an email, it's a normal, readable file again. To send something privately, you need one of the first three.

How to encrypt a file on Windows

With 7-Zip (free, any edition of Windows)

7-Zip is a free, open-source app that puts files into an archive protected with AES-256 encryption. It works on every edition of Windows, and the encrypted file can be sent to anyone.

  1. Install 7-Zip from 7-zip.org.
  2. Right-click the file or folder and choose 7-Zip > Add to archive. On Windows 11, you may need to click Show more options first.
  3. Choose 7z as the archive format, or zip if your recipient uses another archive app, like WinRAR.
  4. Under Encryption, enter a password twice and pick AES-256. With the 7z format, also tick Encrypt file names, so nobody can see what's inside without the password.
  5. Click OK, then delete the original if you no longer need an unencrypted copy.

Your recipient needs 7-Zip or a similar app to open it, because Windows' own zip tool doesn't support encrypted archives. For more on zip files, see our guide to sending a zip file.

With Windows' built-in file encryption (not on Home)

  1. Right-click the file or folder and choose Properties.
  2. Click Advanced and tick Encrypt contents to secure data.
  3. Click OK, then Apply, then OK.

This isn't available in the Home edition of Windows. It also only protects the file on your PC, under your Windows account: Microsoft warns that encrypted files you put in a zip folder come out unencrypted when they're unzipped. Use it for files you keep, not files you send.

Encrypt your whole PC

Device Encryption encrypts your entire drive, so your files are safe if your laptop is stolen. It's switched on automatically when you sign in with a Microsoft account on supported PCs. You can check it in Settings > Privacy & security > Device encryption.

How to encrypt a file on a Mac

With an encrypted disk image

An encrypted disk image is a password-protected container for files, built into every Mac:

  1. Open Disk Utility and choose File > New Image > Blank Image.
  2. Give it a name, choose where to save it, and set a size big enough for your files.
  3. Set Format to APFS, then click the Encryption menu, choose an encryption option, and enter a password twice.
  4. Leave the other options as they are, click Save, then Done.
  5. Copy your files onto the disk image that opens in Finder, then eject it.

To encrypt a folder you already have, choose File > New Image > Image from Folder instead. Remember to eject the image when you're done: as long as it's open, anyone using your Mac can see the files. Disk images are a Mac format, so this is best for files you keep, not files you send to Windows users.

Encrypt your whole Mac

FileVault encrypts everything on your Mac's startup disk, and Apple turns it on by default on Macs running macOS 26.4 or later. You'll find it in System Settings > Privacy & Security.

How to encrypt a PDF or Office file

Word, Excel and PowerPoint

In the desktop app, go to File > Info, click Protect Document (Protect Workbook in Excel, Protect Presentation in PowerPoint) and choose Encrypt with Password. Enter the password twice, then save the file. Anyone opening it now needs the password, on any computer.

PDFs on a Mac

  1. Open the PDF in Preview and choose File > Export.
  2. To keep the original as it is, give the copy a new name.
  3. Click Permissions, select Require Password To Open Document and enter a password.
  4. Enter an owner password too, then click Apply and Save.

PDFs on Windows

Windows has no built-in way to password-protect a PDF. Put it in an encrypted 7-Zip archive as shown above, or use a PDF editor that supports passwords.

Watch out for features that sound similar but don't encrypt anything. Restrict Editing in Word and the Locked option in Preview only stop changes. Anyone can still open and read the file.

Encrypting files on your phone

Your phone already does it. iPhones encrypt every file with its own key as it's saved, and new Android phones have used file-based encryption since Android 10. Setting a strong passcode is what keeps that encryption locked.

Like file encryption on a computer, this only protects files while they're on your phone. To send a file from your phone so only the right person can open it, use an encrypted link, as below.

How to send an encrypted file

Option 1: An end-to-end encrypted link

The simplest way to send a file privately is a link that's encrypted end to end. VeilShare encrypts every file with AES-256-GCM in your browser before it's uploaded. The key is in the part of the link after the #, which browsers never send to a server, so we only ever store scrambled data and can't read your files.

  1. Drop your file onto the upload box on our homepage, on a computer or a phone.
  2. Pick how long the link should last, 6, 24, 48 or 72 hours, and add a password if wanted.
  3. Click on the upload button and send the link. If you added a password, send it another way.

Your recipient opens the link in any browser, with nothing to install, and the link stops working when it expires. It's free up to 3 GB without an account. Read more about how VeilShare encrypts files.

Option 2: An encrypted file by email

Encrypt the file with 7-Zip or Office as above, attach it and send it. Then send the password some other way, like a text message or a phone call. If the password is in the same email, anyone who gets into that inbox gets the file too. Encrypted 7-Zip files still count toward the 20 to 25 MB attachment limit, and Gmail blocks password-protected archives that contain another archive.

Sending ID or financial documents? Our guide to emailing a copy of your passport covers why plain email attachments are risky.

Don't lose the password

Real encryption has no back door. Apple warns that if you forget the password to an encrypted disk image, you won't be able to open it, and Microsoft says Word can't recover a forgotten document password. So:

  • Use a long passphrase of several random words. It's easier to remember and harder to guess than a short, complicated password.
  • Save it in a password manager before you encrypt anything.
  • Never send a password in the same message as the file it protects.

Frequently asked questions

On Windows, use 7-Zip, a free app that puts files in an archive protected with AES-256 encryption and a password. On a Mac, create an encrypted disk image in Disk Utility, or password-protect a PDF in Preview. To send a file, an end-to-end encrypted link like VeilShare encrypts it in your browser for free.

Windows' built-in file encryption isn't available in the Home edition. Use 7-Zip instead: right-click the file, choose 7-Zip > Add to archive, enter a password and pick AES-256.

On a Mac, open it in Preview, choose File > Export, click Permissions and select Require Password To Open Document. On Windows, there is no built-in option, so put the PDF in a password-protected 7-Zip archive or use a PDF editor that supports passwords.

Encryption scrambles the file so it can't be read without the key or password. Some password features only stop people from editing a file, like Restrict Editing in Word or locking a file in Preview, and the content can still be read. For privacy, use an option that asks for a password to open the file.

Encrypt the file with 7-Zip or Office, attach it, and send the password separately, for example by text message. Or skip the attachment and email an end-to-end encrypted link, which your recipient opens in their browser with nothing to install.

The file is gone for good. Apple warns that you won't be able to open an encrypted disk image without its password, and Microsoft says Word can't recover a forgotten document password. Keep it in a password manager.

Fontes

Send files only your recipient can open

End-to-end encrypted in your browser, free up to 3 GB and no account needed. We only ever store scrambled data.

Partilhar um ficheiro