Skip to content

How to encrypt a file

Rate this post

How to encrypt a file: You have not yet managed to gather the amount necessary to buy a computer all for you and so you are forced to share your data with that of your brothers on the home PC: this means that your privacy is practically reduced to zero. It’s tough, I know, but don’t worry. There is a way to keep files safe even if multiple people use your computer.

Bravo, I was just thinking of a method to encrypt documents and make them accessible only after entering a password at the time of opening. If you are interested (and, considering the circumstances, I would say yes!), Then take a few minutes of free time all for yourself, make yourself comfortable and immediately begin to focus on reading this tutorial of mine entirely dedicated to how to encrypt a file .

Together, we will find out how to carry out this type of operation on all the most common types of files: PDF, Word, Excel and so on, not only acting from a PC but also from a smartphone and tablet. In the end, you will see, you can say that you are happy and satisfied with what you have learned. Are you ready? Yup? Great. So let’s ban the talk and start immediately to get busy!

How to encrypt a PDF file

Are you interested in  how to encrypt a PDF file ? Don’t worry, you will find all the explanations you need right below, both for Windows and macOS and for Android and iOS . It’s a lot simpler than you think, don’t worry.

LibreOffice (Windows / macOS / Linux)

LibreOffice PDF password

The first tool I want to invite you to consider is LibreOffice , the famous open source and zero-cost office suite running on Windows, macOS and Linux, which is considered by many as the best free alternative to Microsoft Office . Thanks to it you can view, edit and create text documents, spreadsheets etc. and, of course, also open and edit PDF files, having the ability to password protect them.

To download it, go to the program’s website and click the Download the xxx version button . Once the download is complete, if you are using Windows , open the obtained .msi file and, in the window that appears, click on the Run button . Then press the Next button , select the Typical option and click the Next and Install buttons . Then complete the setup by clicking on the Yes and Finish buttons .

If you are using macOS , open the obtained .dmg package , move the LibreOffice icon to the Applications folder , right click on it and select the Open item from the menu that appears. Then, click on the Open button in response to the notice that is proposed to you, in order to start the program by going around the limitations imposed by Apple on applications from non-certified developers (an operation that must be carried out only at the first start).

At this point, always if you are using macOS, go to the LibreOffice website again and click on the Translated User Interface button , to download the Italian translation of the suite. When the download is complete, close LibreOffice (using the key combination  cmd + q ), open the newly downloaded .dmg package , right-click on the executable LibreOffice Language Pack inside it, select the Open item from the menu that appears and click on Open and Install buttons . Then select the /Applications/LibreOffice.app item from the window that appears on the screen and click the Install button. If you are shown a warning about permissions, click on the Yes button , identify me , type the password of your user account on macOS and click on the OK button twice in a row.

Then start LibreOffice again , click on the Open file menu located in the upper left part of the program screen and select the PDF you want to work on, then go to the File menu (top left), click on the Export item in PDF format and, in the new window that opens, select the Security tab .

Now, click on the Set password button , type the authorization and the opening password (in the appropriate fields) and click the OK button . Finally, adjust the protection options by selecting those of your interest on the left (by default printing and changes are not allowed), click on the Export button and specify in which location you want to save the encrypted file on your computer.

Preview (macOS)

Preview PDF password

If what you are using is a Mac, you can encrypt your PDF files even without resorting to the use of extra tools. In this case, in fact, all you need is Preview , the application included “standard” in macOS to open and edit images and PDF files.

To use it for your purpose, first open the PDF you want to act on by double clicking on its icon. After opening, click on the File menu  located at the top left and choose the Print item . Then click on the PDF drop-down menu located at the bottom left, select the Save as PDF option  from the latter and press the Security Options button in the new window that opens.

To conclude, select the Request password option to open the document , type the password you want to use in the appropriate fields and click the OK and Save buttons .

Foxit PDF (Android / iOS)

Foxit PDF

If, on the other hand, you need to encrypt a PDF file on smartphones and tablets, the best suggestion I can offer you is to use  Foxit PDF : it is an application available for both Android and iOS thanks to which you can view and edit the documents in question, as well as adding a password for opening, editing and printing. It’s free, but the aforementioned functions are paid and must be unlocked through in-app purchases (at a cost of € 10.99 / year). However, there is a 7-day free trial period that allows you to evaluate all the features offered.

To download Foxit MobilePDF on Android , connected to the relevant section of the Play Store and tap the Install button . To download it on iOS , however, access the relevant section of the App Store , press the Get / Install button and authorize the operation via Face ID , Touch ID or password . Next, open the application by tapping on its icon which has been added to the home screen.

Now, follow the initial presentation of the app by scrolling through the various screens and press the Start button . Then tap the button with the three horizontal lines located at the top left, select the items Documents or Recent from the menu that opens and open the PDF you want to password protect.

Then tap on the button with the three vertical dots located at the top right, choose the Password protect option (on Android) or the File encryption option (on iOS) and activate the trial version of the app to take advantage of the aforementioned functionality .

Finally, enable the Add document restrictions option and decide which options to leave active and which, on the other hand, to deactivate, scroll the displayed screen, type the password you want to use in the Password field and tap the button to confirm everything. Done!

How to encrypt a ZIP file

If, on the other hand, you want to find out how to be able to encrypt a ZIP file , there is nothing left to do but test the resources I have shown you in the following steps. There are some for Windows , macOS , Android and iOS .

7-Zip (Windows)

7-Zip password ZIP file

If what you are using is a Windows PC , to create encrypted ZIP files, I recommend resorting to the use of 7-Zip , the famous free program thanks to which it is possible to generate compressed archives in 7Z, ZIP and other formats.

To download it to your computer, go to the program’s website and click on the Download link  located next to the wording .exe 64-bit x64 or .exe 32-bit x86 , based on the version of Windows installed on your PC. When the download is complete, open the obtained .exe file and, in the window that appears on the screen, click on the Yes , Install and Close buttons to complete the setup.

Next, locate the files you want to insert in the ZIP archive to be password protected, select them, right click on one of them and, in the menu that opens, choose the  7-Zip> Add to archive items .

In the 7-Zip window that is now shown to you, select ZIP from the File format menu , type the password you want to use in the appropriate items, select the AES-256 item from the Cryptographic method menu , tick the box next to the item Encrypt i file names and click the OK button . The file will be saved in the same location as the source documents.

Keka (macOS)

Keka password ZIP

Keka is a specific software for macOS that allows you to open and create compressed archives in various formats, ZIP included and also with passwords. It has a nice user interface, it’s easy to use and it’s free. Eventually, however, I would like to underline it, it is available in a paid variant (costs 3.49 euros) which can be purchased from the Mac App Store to support and reward the work of the developers.

To download the free version of Keka, go to its website and click on the Download vx.x.xx button . When the download is complete, open the obtained .dmg package , move the Keka icon in the Applications folder , right click on it and select the Open item from the context menu, in order to open the program going around the limitations that Apple imposes on applications from non-certified developers (an operation that must be performed only at the first start).

Now that you see the Keka window on the screen, to create a password-protected ZIP file do this: select the ZIP format from the drop-down menu located at the top right, type the password you want to use to protect the ZIP file in the Password fields e Repeat and check the box Use AES-256 encoding .

To conclude, drag the files of your interest to the window displayed, in correspondence with the word Release here to compress  and an encrypted ZIP file will be created in the same position as the original elements. It was easy, wasn’t it?

RAR (Android)

RAR ZIP file password

Let’s now turn to the Android side . To encrypt a ZIP file in this case, I suggest you use RAR , an application developed by RARLAB, the manufacturer of WinRAR , the well-known program for opening and creating RAR files on Windows operating systems. It allows you to open and generate various types of compressed archives, ZIP files included, with a password in tow. It’s free, but it contains advertisements that can be removed by subscribing to a subscription (at a cost of 1.19 euros / year) after a 14-day free trial.

To download the app, visit the relevant section of the Play Store and tap the Install button . Afterwards, launch the application by selecting its icon which has been added on the home screen.

Once the main RAR screen is displayed, allow the app to access the memory and / or SD of the device in use, by pressing on the Allow item , then press the No, see ADSL that are less relevant and Agree buttons , to deactivate the advertising tracking.

Next, select the files you want to act on and press the button with the compressed archive and the symbol [+]  (located at the top). Then type the name you want to assign to the archive in the Archive name field and press the Set keyword button .

Type, therefore, the password you want to use to protect the ZIP file in the dedicated field and press the OK item  (bottom right) twice in a row. Once this is done, the protected ZIP file will be created and saved in the same position as the source elements.

ZIP & RAR File Extractor (iOS)

ZIP & RAR File Extractor

If you have an iPhone or iPad , to encrypt a ZIP file you can take advantage of the ZIP & RAR File Extractor app . As the name suggests, it is a specific application for iOS that allows you to extract ZIP and RAR files but also to create new compressed archives, both with and without passwords. It’s free, but it offers in-app purchases (at a cost of 3.49 euros) to remove advertising.

To use it, visit the relevant section of the App Store , press the Get / Install button and authorize the download via Face ID , Touch ID or password . Next, open the application by tapping on its icon which has been added to the home screen.

Now that you see the application screen, indicate the location where the files you want to include in the password-protected ZIP archive that you are by genre are located and select them. Then press the Edit button located at the bottom left, affix a check mark next to the name of the files and tap the button with the compressed archive , located at the bottom right.

Then select the ZIP Files with AES Password option from the menu that appears, type the name you want to assign to the ZIP file and the relative password in the fields on the screen and tap the Save button . The created ZIP file will be saved in the same location as the selected files.

How to encrypt a RAR file

Do you need to encrypt a RAR file but don’t know which resources to turn to? Then immediately test the ad hoc tools for Windows , macOS and Android (for iOS, unfortunately, there are no solutions of this type) that I proceeded to report below.

WinRAR (Windows)

WinRAR password

If what you are using is a Windows PC , to protect the RAR archives with a password you can rely on  WinRAR , the famous software for managing archives in RAR format, in fact. Note that the program is distributed in the form of trialware, so it can be downloaded and used for free, but at every start it shows a warning inviting you to purchase a license within 40 days, after which WinRAR continues to work but shows the invitations to the purchase more insistently and some advanced functions, such as the one covered by this step, are blocked.

To download WinRAR on your computer, go to the website of the program and click on the Download button that you find under the item WinRAR for Windows Xp / 2003 / Vista / 2008/7/8/10 64-bit  or that WinRAR for Windows 32-bit XP / 2003 / Vista / 2008/7/8/10 , depending on the version of Windows you are using.

Once downloaded, open the obtained .exe file and click on the Yes , Install , OK and Close buttons , in the window that appears on the screen.

Then, right click on the files you want to include in the protected RAR archive you are about to create, select the Add to an archive item from the menu that appears, click on the Set Keyword button in the window that is shown to you and type in the two specific fields, the password with which you want to protect the archive. Then press the OK button , the one with the word Browse on it to indicate the location to save the file and, finally, the Save button .

SimplyRAR (macOS)

SimplyRAR password

If you are using macOS , to create password protected RAR archives you can take advantage of SimplyRAR , a free application that allows you to create and encrypt RAR files on Mac, in fact. Unfortunately it has not been updated for a few years now, but still continues to work without problems even on the most recent versions of the Apple operating system.

To download it to your computer, go to the download page on the MacUpdate website and press the Download button . If necessary, also click on the link No thanks, take me to my download and wait for the software download to start and complete.

Then, open the obtained .dmg package , drag the SimplyRAR icon in the Applications folder , right click on it and select the Open item from the contextual menu that appears, so as to start the program, however, going around the limitations imposed by Apple on applications from non-certified developers (an operation that must be performed only at the first start).

Once the program window appears on the screen, drag over the files and / or folders you want to include in the RAR file to be password protected, select the Password protect option at the bottom right, fill in the two fields displayed with the password that you want to use and click the OK button .

Finally, press the Create RAR button located at the top, enter the name you want to assign to the password-protected compressed archive you are about to generate, indicate the location where you want to save it and click the Make and OK buttons .

RAR (Android)

WinRAR Android RAR file

To create a password protected RAR file on Android you can rely on RAR , the application through which you can generate and open compressed archives that I told you about in the step dedicated to encrypted ZIP files .

The use of the app is practically the same as what I have already described to you in the previous lines. The only difference is that, in this case, you will have to select the RAR format and not the ZIP format in the Storage Options screen visible after selecting the files to be compressed and after pressing on the button with the compressed archive and the symbol [ +] located at the top.

How to encrypt a Word file

Protect a Word Mac file

Are you interested in how to proceed to encrypt a Word file ? Very well. Then follow the instructions on what to do in this step. Below you are explained how to do it using  Word to Microsoft Office . The indications are valid only for the Windows and macOS version of the program. The apps for Android and iOS and the online version of Word do not allow the creation of password-protected documents, sorry.

That said, to protect a Word file with a password, firstly download and install Microsoft Office on your PC, in case you have not already done so. If you need instructions on what to do, you can read my guide on how to download Office for free to clear your ideas.

Afterwards, open the Word file you are interested in going to action by double clicking on it. After that, if you are using Windows , click on the File button located at the top left and then on the Protect document item in the menu that appears.

Next, select the item Encrypt with password from the document protection menu, enter the password you want to use to lock the file in the window that opens and click on the OK button . Finally, confirm the chosen password by typing it again.

If, on the other hand, you are using macOS , select the Review tab from the program toolbar and click on the Protect document button . In the window that opens, type the password you want to use to block the opening of the file in the field Set a password to open the document , click on the OK button , type the password again in the field that is proposed to you and press the button Enter on the keyboard, to save the changes.

For further information, I refer you to reading my specific guide on how to protect a Word file .

How to encrypt an Excel file

Excel file encryption

Let’s see now how to encrypt an Excel file . To succeed, you can use precisely Excel of Microsoft Office . Similarly to what was seen  for Word , even in this case the indications are valid only for Windows and macOS . The app for Android and iOS and the online version of the service, in fact, do not allow you to perform this type of operation.

Having said that, to create a password-protected Excel file, download and install  Microsoft Office on your PC (if you have not already done so, of course) following the instructions in my guide on  how to download Office for free .

Next, open the Excel file on which you intend to intervene, by double-clicking on it, and, if you are using Windows , click on the File button located at the top left, then go to the Protect workbook menu on the next screen and select the item Encrypt with password from the menu that appears. If you cannot see the Protect Workbook menu , select the Information item from the left sidebar.

In the window that opens, type in the password you want to use to protect your Excel file and click on the OK button . Repeat the same operation to confirm the settings and you’re done.

If, on the other hand, you are using macOS , go to the File menu (top left) and select the Password item . In the window that opens, enter the password you want to use to protect the document and click on the OK button . To conclude, enter the chosen password for the second time and click on the OK button to save the changes.

For further information, I recommend reading my article specifically focused on how to put the password to an Excel file .

How to encrypt other types of files

Computer

In the previous lines we had the opportunity to find out, together, which tools to use to encrypt the most common types of files. If, however, the element in which you wish to intervene has a format other than those mentioned, or if the resources reported have not been to your liking, you can turn to one of the generic tools for Windows and macOS that you find in my review dedicated to programs to encrypt a file .

Additional useful resources, also for Android and iOS , are mentioned in my guide on how to protect a folder with a password . The reference is to whole folders , it is true, but you will still find useful solutions to keep your files under lock and key.