BlogHow to encrypt a file (2025 guide)

How to encrypt a file (2025 guide)

Imagine you have a confidential business proposal on your computer, but you're worried about unauthorized access if your device is lost, stolen, or compromised. Without encryption, anyone who gains access to your files can read your sensitive information. This scenario highlights why file encryption is essential for protecting your data.

File encryption

File encryption transforms your data into unreadable code that can only be decrypted with the correct key or password. Whether you're protecting personal documents, business files, or sensitive information, encrypting files adds a crucial security layer. This guide covers multiple methods to encrypt files, from built-in operating system tools to secure cloud-based solutions.

Quick recap of file encryption methods

  1. Built-in OS encryption: Use Windows BitLocker, Mac FileVault, or Linux LUKS for full disk or folder encryption
  2. Archive encryption: Create password-protected ZIP or RAR files using built-in tools or third-party software
  3. PDF encryption: Secure PDF documents with password protection and access restrictions
  4. Cloud-based encryption: Use secure platforms like Papermark for encrypted file sharing with additional security features
  5. Third-party encryption tools: Utilize specialized software like VeraCrypt for advanced encryption needs

Method 1: Encrypt files using built-in operating system tools

Most operating systems include built-in encryption tools that provide strong security without requiring additional software.

Windows: Encrypt files with BitLocker or EFS

Using BitLocker (Windows Pro/Enterprise):

  1. Right-click the file or folder you want to encrypt
  2. Select "Properties" from the context menu
  3. Click "Advanced" in the General tab
  4. Check "Encrypt contents to secure data"
  5. Click "OK" and then "Apply"
  6. Choose encryption scope: Encrypt the file only or the file and its parent folder
  7. Backup your encryption key: Windows will prompt you to save a recovery key—store this securely

BitLocker encryption

BitLocker provides transparent encryption that works automatically once enabled. Files are encrypted using your Windows account credentials, so they're automatically decrypted when you're logged in and encrypted when you're not.

Using EFS (Encrypting File System):

EFS is available on Windows Pro, Enterprise, and Education editions. It encrypts individual files and folders using your Windows user account certificate. Files encrypted with EFS can only be accessed by the user who encrypted them or designated recovery agents.

Mac: Encrypt files with FileVault or Disk Utility

Using FileVault (Full disk encryption):

  1. Open System Settings (or System Preferences on older macOS)
  2. Go to Privacy & Security > FileVault
  3. Click "Turn On FileVault"
  4. Choose recovery method: Use iCloud account or create a recovery key
  5. Store the recovery key securely if you choose the manual option
  6. Restart your Mac to complete the encryption process

FileVault encrypts your entire startup disk using XTS-AES-128 encryption. Once enabled, all files on your Mac are automatically encrypted and decrypted transparently.

Using Disk Utility (Encrypted disk images):

  1. Open Disk Utility (Applications > Utilities)
  2. Click File > New Image > Blank Image
  3. Configure the image:
    • Set name and location
    • Choose size (adjustable or fixed)
    • Select "128-bit AES encryption"
    • Choose "read/write disk image"
  4. Set a strong password and optionally save to keychain
  5. Click "Save" to create the encrypted container
  6. Mount the image by double-clicking it and entering your password
  7. Drag files into the mounted volume to encrypt them

Linux: Encrypt files with LUKS or eCryptfs

Using LUKS (Linux Unified Key Setup):

  1. Create an encrypted volume:
    sudo cryptsetup luksFormat /dev/sdX
  2. Open the encrypted volume:
    sudo cryptsetup luksOpen /dev/sdX encrypted_volume
  3. Format and mount:
    sudo mkfs.ext4 /dev/mapper/encrypted_volume
    sudo mount /dev/mapper/encrypted_volume /mnt
  4. Copy files into the mounted directory
  5. Unmount and close when done:
    sudo umount /mnt
    sudo cryptsetup luksClose encrypted_volume

Method 2: Encrypt files using archive tools

Creating password-protected archives is a simple way to encrypt files without modifying your operating system settings.

Windows: Create encrypted ZIP files

  1. Right-click the file or folder you want to encrypt
  2. Select "Send to" > "Compressed (zipped) folder"
  3. Double-click the ZIP file to open it
  4. Click "File" > "Add a password" (Windows 10/11)
  5. Enter a strong password and confirm it
  6. Click "OK" to apply encryption

Note: Windows built-in ZIP encryption is relatively weak. For stronger security, use third-party tools like 7-Zip or WinRAR.

Using 7-Zip (Windows/Mac/Linux)

  1. Download and install 7-Zip from 7-zip.org
  2. Right-click the file or folder you want to encrypt
  3. Select "7-Zip" > "Add to archive"
  4. Configure encryption:
    • Set archive format to "7z" or "zip"
    • Enter a strong password
    • Select "AES-256" encryption method
    • Check "Encrypt file names" for additional security
  5. Click "OK" to create the encrypted archive

7-Zip uses AES-256 encryption, which is much stronger than Windows' default ZIP encryption.

Mac: Create encrypted ZIP files

  1. Select the file or folder you want to encrypt
  2. Right-click and select "Compress [filename]"
  3. Open Terminal (Applications > Utilities)
  4. Navigate to the ZIP file location:
    cd ~/Desktop
  5. Encrypt the ZIP file:
    zip -e encrypted_file.zip original_file.zip
  6. Enter and verify a password when prompted

Method 3: Encrypt PDF files

PDF encryption allows you to protect documents with passwords and access restrictions.

Using Adobe Acrobat

  1. Open your PDF in Adobe Acrobat
  2. Go to File > "Protect Using Password" (or Tools > Protect)
  3. Select "Encrypt with Password"
  4. Choose security settings:
    • Require password to open the document
    • Require password to copy, edit, or print
  5. Enter a strong password and confirm it
  6. Click "OK" and save the encrypted PDF

Using online PDF encryption tools

Several online tools allow you to encrypt PDFs without installing software:

  1. Visit a PDF encryption service like SmallPDF, ILovePDF, or PDF24
  2. Upload your PDF file
  3. Set encryption options: Choose password protection and permission restrictions
  4. Enter a password and confirm it
  5. Download the encrypted PDF

Note: Be cautious when using online tools with sensitive documents. Consider using local software or secure file sharing platforms instead.

Method 4: Encrypt files using Papermark

Papermark provides a secure way to encrypt and share files with advanced security features beyond basic encryption.

Papermark secure file sharing

Step-by-step guide for encrypting files with Papermark:

  1. Create your Papermark account:

    • Visit Papermark
    • Sign up for a free account or log in
    • Access your secure dashboard
  2. Upload your file:

    • Click "Upload Document" or drag and drop your file
    • Papermark supports PDFs, presentations, spreadsheets, and more
    • Files are automatically encrypted during upload
  3. Configure encryption and security settings:

    • Navigate to document settings
    • Enable password protection and set a strong password
    • Toggle email verification to require recipient identity confirmation
    • Set access expiration dates to limit file accessibility

Papermark password protection

  1. Enable advanced protection features:
    • Activate dynamic watermarking to add recipient information to each page
    • Toggle download prevention to allow viewing only
    • Configure screenshot protection to discourage unauthorized captures
    • Set custom permissions for different recipients

Papermark dynamic watermarking

  1. Share the encrypted file:
    • Generate a secure, encrypted link
    • Share the link via email or messaging
    • Provide the password through a separate, secure channel
    • Monitor access through Papermark's analytics dashboard

Papermark uses server-side encryption (AES-256) combined with comprehensive access controls. While it doesn't use end-to-end encryption, it provides strong security with the added benefit of document analytics and engagement tracking, making it ideal for business use cases.

Method 5: Use third-party encryption software

For advanced encryption needs, specialized software provides additional features and flexibility.

VeraCrypt (Windows/Mac/Linux)

VeraCrypt is a free, open-source disk encryption software that creates encrypted virtual disks.

  1. Download and install VeraCrypt from veracrypt.fr
  2. Create a new volume:
    • Click "Create Volume"
    • Choose "Create an encrypted file container"
    • Select volume type (standard or hidden)
    • Choose location and name for the container
  3. Configure encryption settings:
    • Select encryption algorithm (AES recommended)
    • Choose hash algorithm (SHA-512 recommended)
    • Set volume size
  4. Set a strong password (minimum 20 characters recommended)
  5. Format the volume and mount it
  6. Copy files into the mounted volume
  7. Dismount when done to secure the files

VeraCrypt encryption

AxCrypt (Windows/Mac)

AxCrypt provides simple file encryption with cloud storage integration.

  1. Download and install AxCrypt
  2. Right-click a file and select "AxCrypt" > "Encrypt"
  3. Enter a password when prompted
  4. The file is encrypted and can only be opened with AxCrypt and your password

AxCrypt encryption

Best practices for file encryption

Follow these practices to maximize the security of your encrypted files.

Use strong passwords: Create passwords with at least 16 characters, mixing uppercase, lowercase, numbers, and special characters. Avoid dictionary words or personal information.

Backup encryption keys: Always backup recovery keys or passwords in a secure location separate from your encrypted files. Consider using a password manager for key storage.

Keep encryption software updated: Regularly update your encryption tools to ensure you have the latest security patches and improvements.

Verify encryption is working: Test that encrypted files cannot be opened without the correct password or key before relying on encryption for sensitive data.

Use appropriate encryption strength: For highly sensitive data, use AES-256 encryption. For less sensitive files, AES-128 may be sufficient and faster.

Combine encryption with other security measures: Encryption protects data at rest, but also use secure transmission methods, access controls, and regular backups.

Comparison: File encryption methods

MethodEncryption strengthEase of useBest for
Built-in OS encryption (BitLocker/FileVault)AES-128 or AES-256Easy (automatic once enabled)Full disk protection, transparent encryption
Archive encryption (7-Zip)AES-256Easy (right-click encryption)Individual files, sharing encrypted archives
PDF encryptionAES-128 or AES-256Easy (built into PDF tools)Document protection, sharing PDFs securely
PapermarkAES-256 (server-side)Very easy (web-based)Business file sharing with analytics and access controls
VeraCryptAES-256 (multiple algorithms)Moderate (requires setup)Advanced users, large encrypted containers

FAQ

More useful articles from Papermark

Ready to securely share documents?