How to Encrypt a Folder or Drive With VeraCrypt

Encryption turns your files into unreadable data unless someone has the password. If a laptop is lost or a USB stick goes missing, that is the difference between an inconvenience and a data breach. VeraCrypt is a free, open-source disk encryption tool for Windows, macOS and Linux. This guide follows the official beginner's tutorial for the most useful starting point, an encrypted container file, and then explains the other options.
How VeraCrypt works in one minute
A VeraCrypt volume can live in three places: inside an ordinary file (called a container), on a partition or drive, or, with extra steps, on the Windows system drive. A container is the easiest to start with. It is a normal file that you can copy, move or back up like any other. When you mount it with the right password, it appears as a new drive letter. Files you save to that drive are encrypted on the fly as they are written, and decrypted in memory as they are read. When you unmount it, or restart Windows, the contents become inaccessible again.
One important rule from the documentation: creating a container does not encrypt existing files. If you pick an existing file as the container's location, VeraCrypt overwrites it. You protect your files by moving them into the mounted volume afterward.
Step 1: Install and launch
Download VeraCrypt from the project's official site (veracrypt.io) and install it. Launch it from the Start menu. The main window shows a list of drive letters and buttons for creating and mounting volumes.
Step 2: Create a container
- Click Create Volume. The Volume Creation Wizard opens.
- Leave the first option, Create an encrypted file container, selected and click Next.
- Choose Standard VeraCrypt volume and click Next.
- Click Select File, choose a folder and type a new file name for the container, for example
Documents.hc. Click Save. Pick a name and place that does not point to an existing file you care about. - On the encryption options page, the tutorial says that if you are unsure, use the default algorithm settings and click Next.
- Enter the size of the container. Choose enough room for the files you plan to store; you cannot easily grow it later, so be generous but realistic.
Step 3: Choose a password
This is the most important step. The wizard explains what makes a good password, so read it. Choose a long passphrase you can remember, type it twice, and click Next.
A warning worth repeating: if you forget the password, the data is not recoverable. VeraCrypt has no reset option. Consider storing the passphrase in a password manager such as KeePassXC, and keep it separate from the container.
Step 4: Generate keys and format
The wizard asks you to move your mouse randomly inside its window until the randomness indicator turns green. The official tutorial recommends moving the mouse for at least 30 seconds, because this adds randomness to the encryption keys. Then click Format. Larger containers take longer. When the success message appears, click OK, then Exit the wizard.
Step 5: Mount the container
- In the main window, pick a drive letter from the list, for example M.
- Click Select File and choose your container.
- Click Mount and type the password. The default key derivation setting is SHA-512; if you do not remember what you chose, leave the option on autodetection, though mounting then takes longer.
- Click OK. If the password is correct, the container appears as a new drive.
Open it from File Explorer like any disk. Copy your private files into it. The tutorial notes that you will not be asked for the password again until you next mount.
Step 6: Unmount when you are done
Select the volume in the VeraCrypt window and click Unmount. Once unmounted, the files are inaccessible and encrypted, and they stay that way after a restart or power loss. Make it a habit, especially before closing a laptop lid in a public place.
Step 7: Clean up the originals
If you copied files into the container from unencrypted locations, the originals are still sitting on disk. The tutorial advises securely erasing them. Note that deletion on SSDs and in recycle bins is not the same as secure erasure, so consider this carefully for very sensitive material.
Encrypting a whole partition or USB drive
For an external disk or a non-system partition, start the same wizard but choose the second or third option on the first page, which creates a volume hosted on a device. After creation you can mount it with Auto-Mount Devices in the main window. This is a good fit for backup drives and USB sticks you carry around. Encrypting a drive that already holds files is different from creating a container, so back the files up first and read the wizard's prompts carefully.
System drive encryption
VeraCrypt can also encrypt the partition or drive where Windows is installed. The documentation describes this as giving the highest level of protection, because temporary files, hibernation and swap files are also encrypted, but it adds pre-boot authentication: you type a password every time before Windows starts. It also involves a VeraCrypt Rescue Disk, and the documentation includes a note on SSDs and the TRIM operation. This is a bigger commitment than a container, so read the System Encryption chapter in the official documentation before you attempt it. The process can run in place while Windows is in use, and can be paused and resumed.
Backups and sync
A container is one big file, so a backup program or sync tool sees it as a single changing file. That works, but small edits can mean re-uploading the whole container, so avoid putting huge containers in a continuous sync folder. A tool such as Syncthing will copy the container between your computers, as long as the volume is unmounted when it syncs. For one-off sharing, 7-Zip can create password-protected archives, which is simpler when the recipient does not need a full encrypted drive.
Quick safety rules
- Keep an unencrypted backup of anything irreplaceable in a secure location, because a damaged container may be unreadable.
- Use a strong, unique passphrase and never reuse your Windows password.
- Unmount before sleeping the computer in public.
- Download VeraCrypt only from its official site.
Software in this article
Comments
No comments yet.





