A RAR file is an archive that stores many files in a compressed form. RAR files are popular because they allow them to be highly compressed and encrypted. In just a few steps, you will encrypt your files and set a password for the RAR file. In this case, even the file names cannot be viewed without a password.
Steps
Method 1 of 2: Windows

Step 1. Download and install WinRAR
With this program you can create a RAR file and protect it with a password. WinRAR is a paid program, but its free trial can be used for forty days. Download WinRAR from rarlab.com/download.htm.
- Read this article to learn how to install WinRAR.
- Do not use the "Get WinRAR FREE with TrialPay" option. This will install not only WinRAR, but also malicious software.

Step 2. Add files to a new archive
This can be done in one of the following ways:
- open the WinRAR window, find the required files in it, select them and click "Add";
- select the files you want, right-click on them, and then click on "Add to Archive" from the menu.

Step 3. Enter a name for the archive
By default, it will be named the same as the folder in which the files being archived are located.

Step 4. Click Set Password
This button is located on the General tab of the Archive Name and Settings window.

Step 5. Enter the password twice
Check the box next to "Show password" to display the characters you enter.
Read this article to learn how to create a strong password

Step 6. Check the box next to "Encrypt file names"
In this case, you will not be able to view the file names unless you enter a password.

Step 7. Click OK to save the password
Click OK on the Archive Name and Parameters window to create a new RAR file.

Step 8. Check the archive
To do this, double click on it. You will be prompted to enter the password you created.
Method 2 of 2: Mac OS X

Step 1. Download and install Simply RAR
It is a small archiving program that can be used to create a simple RAR file. This program is not as functional as WinRAR on Windows, because the RAR format and WinRAR program were created by RARLAB.
WinRAR has a version for Mac OS X, but it is at the testing stage and you can work with it only through the terminal. If you want, download this version from rarlab.com/download.htm. Do not use the "Get WinRAR FREE with TrialPay" option. This will install not only WinRAR, but also malicious software

Step 2. Launch SimplyRAR software
A window will open where you can add files to the new archive.

Step 3. Add files to the archive
To do this, drag the files you want to the SimplyRAR window.

Step 4. Check the box next to “Password protect”
Now you can set a password for the archive.

Step 5. Enter your password
Do this twice.
Read this article to learn how to create a strong password

Step 6. Click “Create RAR”
You will be prompted to enter a file name and select a folder to save it.
Note: unlike WinRAR, you cannot encrypt file names here

Step 7. Check the archive
To do this, double click on it. You will be prompted to enter the password you created.