How To Encrypt A File: A Detailed Guide to Securing Your Data and Privacy

How to encrypt a file

Encrypting files has become the new norm for the digital services we use online, from VPN, email, and cloud storage.

Without it, our data is openly available for anyone to read, compromising our confidentiality, privacy, and security and potentially costing businesses millions in compliance fines.

This comprehensive guide therefore offers you a comprehensive guide on how to encrypt files to ensure your data remains protected by covering the following topics:

  • How to encrypt a file on different devices
  • Encrypting files before uploading to the cloud
  • Cloud storage with zero-knowledge encryption
  • Avoid common encryption mistakes

By the end, you will be able to encrypt files with your chosen apps, learn more about cloud storage such as Dropbox and Google Drive encrypted folders, and when to choose a zero-knowledge or cloud storage service to protect your data from being leaked online.

Table of contents

Why encrypting your files matters

  1. Protect private and confidential data: encrypting files in cloud storage, emails, or file sharing services transforms the plain text of your file to an unreadable format (ciphertext) so neither hackers nor any other unauthorised parties can access your files.
  2. Preservation of privacy: Encrypting files on your devices or external drives helps keep your personal information private by making it unreadable to anyone without the correct encryption key or password. If your device is lost, stolen, or accessed without your permission, encrypted files remain protected even if someone can physically access the storage.
  3. Compliance: Many industries require encryption to comply with data protection regulations like GDPR, HIPAA, or other regional requirements to demonstrate that companies take the necessary measures to protect against data breaches.
  4. Secure file sharing: When sending files over networks, encryption protects your information during transmission.

Different methods of encrypting files

There are multiple ways to encrypt files depending on where they're stored, how they're being shared, and the level of protection required.

Internxt post quantum encryption

File encryption encrypts individual files or folders, making them accessible only with the correct encryption key or password. This is ideal for protecting specific documents before storing or sharing them.

Full-disk encryption encrypts an entire storage device, such as a computer's hard drive, SSD, USB flash drive, or external hard drive. It protects all data on the device and helps prevent unauthorized access if the device is lost or stolen.

For cloud storage encryption, providers like Google Drive, OneDrive, or Dropbox encrypt files only after they reach their servers.

These secure cloud storage, but as the providers stores files on servers they own and manage the encryption keys, employees can access or give access to data to law agencies if required.

Private cloud storage for your files uses client-side or zero-knowledge encryption to encrypt files before they leave your device, ensuring that only you can access their contents because files are encrypted and keys are managed on your device, so nobody but you can access your data.

How to encrypt files on different devices

How to encrypt a file on Windows

  1. Right-click on the file or folder you want to encrypt.
  2. Select “Properties” from the context menu.
  3. Click the “Advanced” button in the General tab.
  4. Check the box next to “Encrypt contents to secure data.”
  5. Click “OK” and then “Apply.”
  6. Choose whether to encrypt just the file or its parent folder as well.
  7. Click “OK” to complete the process.

Once complete, your file shows a padlock to confirm your file is encrypted.

How to encrypt a file on MacOS

To encrypt data on your Mac device, MacOS offers built-in encryption options with FileVault and Disk Utility.

With FileVault enabled, it encrypts the entire startup disk, protecting all files, applications, and system data on your Mac. Anyone without your account password or recovery key cannot access the contents of the drive if the device is lost or stolen.

To enable FileVault on your Mac:

  1. Click the Apple menu and open System Settings.
  2. Select Privacy & Security, then scroll down and click FileVault.
  3. Click Turn On FileVault.
  4. Enter your Mac administrator password if prompted.
  5. Choose how you want to unlock your disk if you forget your password. You can use your Apple Account or create a recovery key to store in a safe place.
  6. Follow the on-screen instructions to confirm your choice.
  7. Restart your Mac if prompted. macOS will begin encrypting your startup disk in the background, which may take a few hours.
Internxt VPN lets you browse the web securely and privately.

Disk Utility allows you to create encrypted folders that act as secure virtual folders for storing sensitive files. You can also encrypt external storage devices such as USB flash drives and external hard drives.

Access to these files requires the correct password, so Disk Utility is a useful option for protecting specific files or storage devices without encrypting your entire Mac.

To do so, follow these steps:

  1. Open Disk Utility from Applications > Utilities.
  2. Go to File > New Image > Blank Image.
  3. Enter a name for the disk image, choose where you want to save it, and specify its size.
  4. Select an encryption level (128-bit AES or 256-bit AES).
  5. Create and verify a strong password for the encrypted disk image.
  6. Choose a disk image format and click "Save."
  7. Double-click the encrypted disk image and enter your password to mount it.
  8. Drag the files you want to encrypt into the mounted disk image.
  9. Eject the disk image when you're finished. Your files will remain encrypted until you mount the disk image and enter the correct password again.

How to encrypt a file on mobile devices

Android

If you have screen lock enabled on your Android devices, then your data will be encrypted, and files stored on your device are unreadable without your PIN, password, or biometric authentication.

To check that your Android device is protected:

  1. Open the Settings app.
  2. Tap Security & privacy or Security (the name may vary depending on your device).
  3. Set up a PIN, password, or pattern if you haven't already.
  4. Enable fingerprint or face unlock if your device supports biometric authentication.
  5. Verify that your device encryption is enabled. On most recent Android devices, this is turned on automatically and cannot be disabled.

iOS

iPhone and iPads automatically encrypt all data stored on the device using hardware-based encryption.

Once you set a passcode, encryption is enabled by default, protecting your files, photos, messages, and other personal data if your device is lost or stolen.

To ensure your iPhone or iPad is encrypted:

  1. Open the Settings app.
  2. Tap Face ID & Passcode or Touch ID & Passcode.
  3. Enter your current passcode or create one if you don't already have one.
  4. Scroll to the bottom of the screen and confirm that "Data protection is enabled" appears.

While both iOS and Android encrypt the data stored on your device, this protection only encrypts your local storage.

If you upload files to cloud storage or share them with others, you'll need to use encrypted cloud storage or file encryption tools if you want the files to remain protected outside your device.

How to encrypt different file types

How to encrypt a PDF file

Encrypting a PDF file is useful to protect documents containing financial records, legal contracts, medical information, business reports, personal data, or confidential work files.

Internxt Meet secure video conferencing

To do so, follow these steps:

  • Open the PDF in Adobe Acrobat Pro.
  • Select All tools > Protect a PDF > Encrypt with Password.
  • Choose whether you want to require a password to open the document or only to restrict editing and printing.
  • Enter a strong password and confirm it.
  • Click Apply to encrypt the PDF.
  • Save the encrypted PDF to complete the process.

How to encrypt Microsoft Office documents

As Google Docs doesn’t allow you to password-protect documents, one workaround is using  Microsoft Office documents to protect sensitive Word, Excel, or PowerPoint files from unauthorized access.

If you want to protect financial information, business reports, contracts, personal data, or confidential work for an Office document, follow these steps:

  1. Open the Word, Excel, or PowerPoint document you want to encrypt.
  2. Click File > Info.
  3. Select Protect Document (or Protect Workbook/Protect Presentation).
  4. Click Encrypt with Password.
  5. Enter a strong password and confirm it.
  6. Save the document to apply the encryption.

How to encrypt a ZIP file

ZIP compresses and combines one or more files and folders into a single file. File compression reduces the overall file size, helping to free up space in cloud storage, and making it easier to store, upload, share, or download multiple files at once.

ZIP files can also be encrypted with a password using the following steps:

  • Install a file archiving tool that supports encryption, such as 7-Zip or WinRAR.
  • Select the file or folder you want to compress.
  • Right-click the selection and choose Add to archive.
  • Choose ZIP as the archive format.
  • Enter a strong password in the encryption section.
  • Select AES-256 encryption if the option is available.
  • Click OK or Create to generate the encrypted ZIP file.

Best services for encrypting files

Internxt

With Internxt, you get encrypted storage that doesn’t require any extra steps when encrypting files. So if you’re wondering how to encrypt a file to protect your files in the cloud, Internxt does this all for you.

Internxt uses AES-256 and Kyber-512 post-quantum encryption for all free and paid plans, and you hold the encryption keys so you, and only you, can see your files.

Thanks to this zero-knowledge policy, your files are encrypted automatically on your device, during transit, and on Internxt’s servers, but because you hold the encryption keys, neither Internxt nor anybody else can view the contents.

The same applies when you share files online with Internxt: you don’t have to create an encrypted file beforehand; Internxt Drive creates an encrypted link with password protection, and you can also send encrypted files for free with Internxt Send.

Internxt best cloud storage pricing

On top of Internxt’s secure cloud storage, Internxt also offers more encrypted services to ensure your data remains private online with the following services:

For encrypting files and more, get started with Internxt for free, or choose from any paid lifetime or monthly plan below.

Plan Storage Features Annual (Paid monthly) Lifetime Cost
Essential 1TB
  • Antivirus
  • Backups
  • Post-quantum encryption
  • Password-protected file sharing
  • VPN
€1.99/month €380
Premium 3TB
  • Antivirus
  • Backups
  • Post-quantum encryption
  • Password-protected file sharing
  • VPN (3 locations)
  • Cleaner
  • File versioning
€3.99/month €580
Ultimate 5TB
  • Antivirus
  • Backups
  • Post-quantum encryption
  • Password-protected file sharing
  • VPN (5 locations)
  • NAS
  • Rclone support
  • Meet
  • Mail
  • File versioning
€5.99/month €780
*Prices are correct at the time of writing and are subject to change. For latest prices, check https://internxt.com/pricing

Cryptomator

With Cryptomator or a Cryptomator alternative, you can encrypt files to secure data to encrypt files on your device before uploading them to cloud storage providers like Google Drive or OneDrive to guarantee they cannot view the contents of your encrypted folders.

How to encrypt a file with Cryptomator:

  1. Install Cryptomator and open the application.
  2. Create a new vault and choose where if you want to save it in a cloud storage folder or on your computer.
  3. Create a strong password for the vault. This password is required to access your encrypted files.
  4. Copy or move the file you want to protect into the unlocked vault.
  5. Cryptomator automatically encrypts the file as it is saved inside the vault.
  6. When you have finished, lock the vault from the Cryptomator application.

How to avoid common mistakes when encrypting files

Data encryption is almost impossible to break; if encrypted data is hacked, it is likely due to these common errors:

  1. Weak passwords: Attackers use advanced software to try to crack passwords; if you repeat or use weak passwords, it makes it easier for them to access your encrypted file or cloud storage accounts.
  2. Losing a backup key: If you forget your password, you cannot regain access to your files because only you know your encryption credentials, causing the data to be permanently lost.
  3. Not backing up encrypted data. Encryption does not protect against accidental deletion, hardware failure, or corruption. Keep backups of your encrypted vault in a separate location.

To prevent these mistakes, ensure you use a strong password or passphrase to protect your files and accounts, store your backup key in safe places you can always access whenever needed, and follow the 3-2-1 backup rule to protect important files against data loss.

How to ensure your encrypted files stay protected

  1. Use strong, unique passwords or passphrases to protect encrypted files and accounts.
  2. Enable multi-factor authentication whenever possible.
  3. Keep all software up to date to protect against newly discovered vulnerabilities.
  4. Back up encrypted files regularly and store backups in a separate, secure location.
  5. Store passwords and recovery keys securely, such as in a trusted password manager.
  6. Lock or unmount encrypted vaults when they are not in use.
  7. Choose zero-knowledge cloud storage providers.
  8. Verify that files have been encrypted successfully before deleting the original copies.
  9. Securely erase unencrypted copies of sensitive files once they are no longer needed.
  10. Use trusted, well-maintained encryption software that has been independently audited.
  11. Follow the principle of least privilege by only giving access to encrypted files to people who need it.
  12. Periodically test that encrypted files and backups can still be accessed and recovered.
Secure Cloud Object Storage (S3 Compatible) — Internxt S3
Internxt S3 offers secure, private, and affordable cloud object storage. Scale your storage needs with our S3-compatible cloud based object storage solution.
Internxt Antivirus — Protect your devices from malware
Internxt Antivirus scans and removes viruses from your files. Protect your devices from malware and ensure complete security in the cloud.
Internxt Cleaner — Optimize and Clean your Computer
Find and clear junk files to boost device speed, responsiveness, and performance.

Frequently asked questions

Can encrypted files be hacked?

Encrypted files cannot be easily hacked if they use modern encryption standards such as AES-256 and are protected by a strong password or encryption key.

If encrypted files are hacked, it is likely due to misconfigured security settings, weak passwords, stolen encryption keys, or software vulnerabilities rather than breaking the encryption itself.

Can a cloud provider see my encrypted files?

If you upload files to cloud storage services like Google Drive, Dropbox, or OneDrive without encrypting them before they’re uploaded to the cloud, the provider can technically access your data because they do not use end-to-end encryption for standard file storage.

While these services encrypt data in transit and at rest to protect it from external attackers, they retain the encryption keys needed to decrypt your files.

If you encrypt your files before uploading them or use a cloud storage service with end-to-end encryption, like Internxt, only you hold the decryption key. This not even the cloud provider can view your file contents, even though they store the encrypted data on their servers.

What happens if I forget my encryption password or backup key?

If you forget your encryption password or lose the encryption key, you will permanently lose access to your encrypted files. Most encryption methods cannot recover encrypted data without the correct credentials, so it is important to store recovery keys securely.

Can I encrypt files before uploading to Google Drive?

Yes. Encrypting files before uploading them to Google Drive adds an extra layer of security. Only someone with the correct encryption password or key can access the file, even if your cloud account is compromised.

Is AES-256 secure?

Yes. AES-256 is one of the most secure encryption standards available today. It is widely used by governments, financial institutions, and cybersecurity professionals to protect sensitive data and is considered resistant to current brute-force attacks when paired with a strong password.

Can encrypted files be recovered?

Yes, but only if you have the correct password, encryption key, or a valid recovery key. Without these credentials, recovering properly encrypted files is generally not possible.

Which file types can be encrypted?

Almost any file type can be encrypted, including documents, PDFs, spreadsheets, images, videos, audio files, databases, archives, and backups. Encryption works on the file's contents rather than its format, making it compatible with virtually all file types.