How to Encrypt a File on Android, Windows, iOS, Linux and MacOS

Encrypting a file or document is the easiest way to prevent other people from accessing its content. Thus, unless we have the password or decryption key it will be practically impossible to see what it contains. In the next post we will see what methods we can use in most operating systems to encrypt a file securely.

Before starting it would also be interesting to clarify that the encrypted files are not 100% indecipherable. A good hacker can (albeit with difficulty) bypass encryption protection. Something that can happen if we keep passwords and cryptographic keys in an unencrypted file or our system is infected by a keylogger. If we have really valuable information, the most recommended solution is to hire an encryption service in the cloud (mainly oriented to companies).

It is also recommended to make an unencrypted backup of all sensitive files, in case we lose the unlock passwords. It is best to save these backups in a physical storage -memory or external disk-, preferably offline.

How to encrypt a file on Android

As of Android 6.0, all Android phones and devices already come with the internal encrypted memory as standard, we can always choose to also encrypt the SD card.

In case we want to protect a single file, we can do it using applications such as Andrognito, which uses a 256-bit AES algorithm with military-grade encryption to safeguard user files.

To encrypt a file with Andrognito, once we have installed the application, open it and follow these 4 steps:

  • We register and enter a 4-digit PIN or unlock pattern.
  • By default the system will create a vault or “Vault”. All the files that we add to this vault will be protected and encrypted.
  • To add files to our vault we just have to click on the “+” icon and select the document by making a long press and confirming on the “OK” icon that we will see at the top right. If the encryption was successful we will see a green message.
  • If we later want to decrypt any of these documents, we can do it simply by entering the vault and clicking on the drop-down menu next to each file and selecting “Decrypt and export”.

One of the interesting details of this application is that it saves the encrypted documents in the cloud, thus freeing up storage space and allowing access to the file from any other device (as long as we use the same account, of course).

How to encrypt a file in Windows

If we want to protect a file with important information on a Windows computer, we have several options.

We can use BitLocker -the most reliable method-, a tool that is integrated in Windows 10, but does not allow you to encrypt files individually. Something that we can do with EFS (Encripted File System), although it is not the most recommended solution if we handle very sensitive data. The third alternative is to use a dedicated program, this being the only possible solution in case we have a system with Windows 10 Home Edition.


EFS is an encryption tool that uses Windows in a way that allows you to encrypt both individual files and folders on NTFS drives. It is only available in the Professional, Enterprise and Education versions of Windows.

The system works by making encrypted files available only if the person who encrypted them is logged on to the PC. Here Windows generates an encryption key which in turn is also encrypted and stored locally. It is a simple method, but not too safe (a good hacker could give us the heck if he really wants to). However, if all we want is to protect certain information from curious friends or family, it may be more than enough.

To encrypt a file or folder with EFS:

  • We open the file explorer and right click on the file that we want to encrypt and select “Properties”.
  • Click on “Advanced” and activate the “Encrypt content to protect data” tab. Click on “OK” and then “Apply”.
  • If we have only selected a Windows file, it will invite us to also encrypt the folder for greater security. If we only want to encrypt the file, check “Encrypt only the file” and accept.
  • Then the system will recommend us to make a backup of the certificate and the file encryption key in case the system is damaged or corrupted. If we are interested, we just have to insert a pendrive, click on “Make a backup now” and follow the instructions of the wizard.

Third party applications

Windows 10 Home users do not have the EFS utility, so for these cases it is necessary to install a program that allows us to encrypt files. One of the most efficient and user-friendly in this regard is AxCrypt.

With this program we can change the extension to any file and replace it with the .AXX extension. In this way, the file can only be opened from AxCrypt by entering the previously established password used to encrypt the document in question.

As an alternative, we can also use the 7-Zip program, which is used to compress files in 7z and ZIP format and in turn encrypt them at maximum security with AES-256 encryption.

How to encrypt a document on iPhone

Since the launch of the now distant iPhone 3GS, all mobile phones with iOS system include basic encryption at the hardware level. However, if we want to protect our encrypted files it is necessary that we protect our iPhone or iPad with an access password.

That said, if we want to encrypt a sensitive document, delicate photo or video, we will have to install an application for this purpose, such as Folder Lock. The application works in a very similar way to Andrognito, hiding the files and protecting them with an access password.

How to encrypt a file in Linux

If we are working from a Linux machine we can encrypt any file or folder using the GPG command. The only way to decrypt the file and access the information it contains is by entering the correct password.

Suppose we have the file ~ / Documents / Important.docx and we want to encrypt it.

  • First we open a terminal window and navigate to the folder where the file is located. In this case we would place ourselves in the “Documents” folder.
  • Next, we write the command “gpg -c Important.docx” (without quotes).
  • Now we introduce a complex password and press enter. We confirm the password.

From this moment, we will see how the document has changed its extension to “Important.docx.gpg”. If we want to decrypt it, we just have to reopen a terminal, go to the folder where the file is and write the command “gpg -c Important.docx.gpg”. The system will ask us to enter the password and we can access it again without problems.

How to encrypt a file on MacOS

AES Crypt is open source software that allows us to encrypt any file on MacOS individually. We can download it completely free from its official website HERE (it is also available for Windows, Android and Linux).

Its operation is very simple. We just have to locate the file, drag it to the AES Crypt icon (padlock icon) that we will see in the dock menu and enter a password. It is important that we write down the password somewhere, since there is no password recovery process.

Once this is done, the program will generate an encrypted version of the existing file. This means that we will have 2 versions of the same file: one encrypted and the other unencrypted. Therefore, it is necessary that we proceed to delete the original file or save it on a flash drive as a backup.

Leave a Reply

Your email address will not be published. Required fields are marked *