Home / File Security / How to encrypt files

How-to

How to encrypt files before uploading to the cloud

Updated July 2026

The short version

Lock the file on your own computer before it uploads. On Windows, 7-Zip makes an AES-256 encrypted archive. On any system, VeraCrypt makes an encrypted container. On a Mac, Disk Utility makes an encrypted disk image. The cloud then stores only a file it cannot read.

Knowing how to encrypt files before uploading to the cloud gives you privacy on any storage service, even one that holds its own keys. You lock the file on your computer, upload the scrambled result, and only someone with your password can open it. That protects the contents from a breach at the provider and from any request the provider might be compelled to answer. Here are three free ways to do it.

Why encrypt before uploading?

Most cloud providers encrypt your files on their servers, but they hold the keys, so they can read the contents. Encrypting a file yourself first, sometimes called client-side encryption, means the provider only ever sees a locked version. It is the same idea behind zero-knowledge services like Proton Drive, except you do it manually and it works with any storage account. Our cloud storage safety guide explains where this fits in the wider picture.

Windows: 7-Zip (AES-256 archive)

7-Zip is a free tool that can lock files in an encrypted archive using AES-256, a strong modern cipher. Download it from the official site, 7-zip.org, then:

  1. Right-click the file or folder and choose 7-Zip, then Add to archive.
  2. Set the Archive format to 7z or zip.
  3. Under Encryption, enter a strong password and set the method to AES-256.
  4. Tick Encrypt file names so the list of files is hidden until the password is entered.
  5. Click OK. Upload the resulting archive; keep the password somewhere safe.

The recipient, or you on another device, opens the archive by entering the password in 7-Zip or any tool that reads encrypted 7z files.

Any system: VeraCrypt (encrypted container)

VeraCrypt is a free tool for Windows, macOS, and Linux that creates an encrypted container: a single file that acts like a locked drive. Download it from veracrypt.io, then:

  1. Open VeraCrypt and click Create Volume, then choose Create an encrypted file container.
  2. Choose a Standard volume, then pick a location and name for the container file.
  3. Keep the default encryption and hash settings if you are unsure; the default cipher is AES.
  4. Set the container size and a strong password.
  5. Move your mouse randomly to build randomness, then click Format.
  6. To use it, select the container in VeraCrypt, pick a drive letter, click Mount, and enter the password. Copy files in, then click Dismount.

Upload the container file to the cloud. It stays encrypted until you mount it with your password. One warning from VeraCrypt: creating a container on top of an existing file overwrites it, so always create a new file.

Mac: Disk Utility (encrypted disk image)

macOS has encryption built in through Disk Utility, no download needed. Apple's support guide covers it in full:

  1. Open Disk Utility, then choose File, New Image, Blank Image.
  2. Give it a name and size, and choose a format such as APFS.
  3. From the Encryption menu, choose 256-bit AES, then set and confirm a password.
  4. Set Image Format to read/write disk image and click Save.
  5. The image mounts in Finder. Copy files into it, then eject it to lock it.

Upload the resulting image file. Apple warns that if you forget the password, the image cannot be opened, so store it carefully.

A note on Windows EFS and BitLocker

Windows includes two built-in options, but neither is the right tool for cloud uploads. EFS encryption is tied to your Windows account and does not travel with a file when it is copied to a different drive or uploaded, so the uploaded copy is not protected. BitLocker encrypts a whole disk rather than a single file, which guards the drive at rest but does not produce a portable encrypted file to hand to a cloud service. For a file you plan to upload, a 7-Zip archive or a VeraCrypt container is the better choice.

Frequently asked questions

How do I encrypt a file before uploading it?

Lock the file on your computer first with a tool like 7-Zip, VeraCrypt, or macOS Disk Utility, then upload the encrypted result. The cloud service stores a scrambled file it cannot read without your password.

What is the easiest way to encrypt a file?

On Windows, 7-Zip is the simplest: add the file to an archive, set AES-256 encryption, and choose a strong password. On a Mac, Disk Utility creates an encrypted disk image with a few clicks.

Does encrypting a file protect it in the cloud?

Yes. If you encrypt a file before upload, the provider stores only the scrambled version, so a breach or a legal request cannot expose the contents without your password.

What happens if I forget the encryption password?

The file cannot be recovered. Strong encryption has no back door, so store the password in a password manager. This is the trade-off for real security.

More in file security: Is cloud storage safe · Secure file sharing

Free File Hosting is an independent publication. We review and compare third-party services and are not affiliated with any provider named on this site. The historic freefilehosting.net file-hosting service is no longer in operation. Steps reference the official documentation for 7-Zip, VeraCrypt, and Apple Disk Utility.