All About Cookies is an independent, advertising-supported website. Some of the offers that appear on this site are from third-party advertisers from which All About Cookies receives compensation. This compensation may impact how and where products appear on this site (including, for example, the order in which they appear).
All About Cookies does not include all financial or credit offers that might be available to consumers nor do we include all companies or all available products. Information is accurate as of the publishing date and has not been provided or endorsed by the advertiser.
The All About Cookies editorial team strives to provide accurate, in-depth information and reviews to help you, our reader, make online privacy decisions with confidence. Here's what you can expect from us:
- All About Cookies makes money when you click the links on our site to some of the products and offers that we mention. These partnerships do not influence our opinions or recommendations. Read more about how we make money.
- Partners are not able to review or request changes to our content except for compliance reasons.
- We aim to make sure everything on our site is up-to-date and accurate as of the publishing date, but we cannot guarantee we haven't missed something. It's your responsibility to double-check all information before making any decision. If you spot something that looks wrong, please let us know.
Understanding how to compress and extract files has practical uses when you want to quickly reduce a file size or return it to its original size. Compressing (zipping) and extracting (unzipping) files are convenient ways of downloading and transferring large files.
Explore our guide below on how to incorporate the best practices to compress and extract files. While you’re here, discover the best antivirus software with VPNs to safeguard against downloading malicious files while protecting your privacy for the utmost security.
How to compress and extract files on Windows
How to compress and extract files on macOS
How to compress and extract files on Linux
How to compress and extract files on ChromeOS
How to compress and extract files on iOS
How to compress and extract files on Android
How to safely download, share, and store files
FAQs
Bottom line
Why zip and unzip files?
The main reason why people compress files is to reduce the size of a large file or multiple files so as not to use up all their storage space. If you download large files from the internet and want to transfer them to another computer or send them in an email, it’s easier if the files are compressed; otherwise, the process takes much longer.
When you extract files, it is the complete opposite of compressing them. This process lets you return a compressed file to its original size, usually with a simple right-click. It is very practical for viewing large files, like high-resolution videos or images. Extracted files are uncompressed files since they have been restored to their original size.
The terms “compress” and “zip” are often used interchangeably, but they have a slightly different meaning. While compressing refers to the process of reducing a file’s size, zipping refers to the act of compressing using the (.zip) format. Programs like WinZip, 7-Zip, and RAR ZIP are commonly used. Similarly, “extract” and “unzip” are also used interchangeably. While extracting a file returns it to its original size, unzipping uses the (.zip) format to do this.
How to compress and extract files on Windows
On Windows operating systems, you can decompress a variety of compressed file formats. However, you can only compress files to the (.zip) file format.
Here's how to compress files on Windows:
- Go to File Explorer. You can find it by searching for it in the Start menu, clicking its icon on the taskbar, or pressing Windows + E on your keyboard.
- Right-click the file you want to zip and select Send to the Compressed (zipped) folder. This will compress the file.
Follow these steps to extract files on Windows:
- Open File Explorer. Then search for the compressed folder.
- To unzip the compressed folder, right-click and select Extract All. Then select a location where you want to extract the files to.
- In order to decompress a single file or folder, just double-click the compressed folder and open it.
- Drag the item or click copy from the compressed folder to the location of your choice.
How to compress and extract files on macOS
On the macOS operating system, it’s a three-step process to compress and extract files.
Here’s how to compress or decompress files on macOS:
- Search for the file or folder you want to compress.
- Right-click on the file or folder. Then select Compress <name of file or folder>. This will compress the file into a (.zip) file format.
- To extract the file, double-click on the (.zip) file to decompress it.
How to compress and extract files on Linux
Most Linux users are familiar with the command line and use it for file compression and extraction. This is often done with the gunzip (.gzip) and tarball (.tar.gz) file formats, which are similar to the zip (.zip) file extension.
In the following sections, we will provide step-by-step instructions on how to compress and extract files with the popular formats Linux uses.
Compress and extract files with gunzip (.gzip)
Follow these simple steps to compress and extract files with gunzip.
To compress files:
- Open the Terminal.
- From the command line, type gzip filename.
To decompress files:
- Use the command gunzip filename.gz or gzip -d filename.gz.
Compress and extract files with tarball (tar.gz)
Follow these simple steps to compress and extract files with tarball.
To compress files:
- Enter the command tar -czvf archive_name.tar.gz directory_to_compress. (Tip: archive_name.tar.gz is the name of the compressed archive, and directory_to_compress is the directory you wish to compress.)
To extract files:
- Enter tar -xzvf archive_name.tar.gz in the command line. Take note that the tarball filename archive_name.tar.gz is the name of the archive you wish to extract.
Zip and unzip files on the Linux command line
Follow these steps to compress and extract files using Zip from the command line.
To compress (.zip) files on Linux:
- Open the Terminal to access the command line.
- From the command line, navigate to the directory containing the files or folders you want to compress.
- For files, use the command zip archive_name.zip file_to_compress.
- For folders, use the command zip -r archive_name.zip folder_to_compress to compress a folder. Then replace archive_name.zip with your desired archive name and folder_to_compress with the name of the folder you want to compress.
To extract (unzip) files on Linux:
- From the Terminal, type the command unzip archive_name.zip, replacing archive_name.zip with the name of your zip file. This extracts the file into the current directory.
How to compress and extract files on ChromeOS
Here’s how to zip files on ChromeOS:
- Open the app launcher and click Files.
- Select the files you want to zip.
- Right-click on them and select Zip selection.
Follow these steps to unzip files on ChromeOS:
- Double-click the archive.zip file.
- Select and right-click the files you want to extract, and then click Copy.
- Go to the location where you want to extract the files. Right-click and select Paste.
- When done, click Eject next to the archive.zip folder.
How to compress and extract files on iOS
How to compress files in iOS:
- Open the Files app on your iPhone or iPad.
- Locate the file or folder you want to compress.
- Press and hold the file or folder.
- Tap Compress in the menu that appears.
- Find the new zip file saved in the same location as the original.
How to decompress files in iOS:
- Launch the Files app on your iPhone or iPad.
- Search for the zip file you wish to open.
- Press and hold the zip file.
- Select Uncompress from the menu.
- Access the uncompressed files in the same spot as the zip file.
How to compress and extract files on Android
Android does not have a built-in native feature that allows you to compress files. Instead, Android users must download a third-party app to compress or zip files from the Google Play Store. Popular file apps include Files by Google, ZArchiver, and RAR.
We’ll provide a step-by-step guide on how to zip files on Android using ZArchiver and how to unzip files using Files by Google.
How to zip files on Android with ZArchiver
- Download ZArchiver from the Google Play Store.
- Open ZArchiver and navigate to the folder where your files are located.
- Select the files or folder you want to zip.
- Tap on the Compress option in the menu.
- Enter a name for your zip file and confirm by tapping OK.
- Your zip file will be created in the same location as the original files.
Unzip files on Android with Files by Google
- Ensure Files by Google is installed on your device. Otherwise, download it from the Google Play Store.
- Open the app and locate the zip file you wish to unzip.
- Tap on the zip file. Files by Google will automatically show their contents.
- Select Extract to unzip the files into the current folder, or choose Extract to… so you can pick a different location.
- Once extracted, access your files directly from the chosen folder.
How to safely download, share, and store files
With so many threats looming on the web, it’s crucial to safeguard your system and defend it against malware that secretly hides within downloaded or shared files. Always download files from trusted sources and be wary of file extensions ending in (.exe), (.bat), (.js), and even (.zip) file formats, among others.
We recommend implementing antivirus (AV) protection with a virtual private network (VPN), as this duo significantly enhances file security. AV software scans downloads for malware and removes or quarantines them before they can do harm, provides real-time threat detection, and safeguards your privacy while a VPN encrypts your internet connection. This ensures safe file transfers and protects your data from unauthorized access, helping you stay safe online.
To combat malware, use the best antivirus software for scanning downloaded files and system protection. We curated our list of the best AV protection software with a VPN for secure file sharing, starting with TotalAV as our best overall pick and our strong runner-ups, McAfee and Bitdefender.
The best antivirus software for secure file sharing
- TotalAV: Offers robust features for safely downloading, sharing, and storing files, including real-time antivirus protection and a secure VPN for online privacy.
Get TotalAV | Read TotalAV Review
- McAfee: Provides comprehensive security solutions that include malware protection, encrypted storage, and a VPN to keep your files safe across all devices.
Get McAfee | Read McAfee Review
- Bitdefender: Delivers top-tier security with advanced malware detection, secure file encryption, and a VPN for complete online anonymity and safety.
Get Bitdefender | Read Bitdefender Review
FAQs
Is compress and extract the same?
No, they’re opposite. Compressing a file reduces its size. Extracting a file restores its size.
How do I compress or extract files?
There are various ways to compress or extract files, depending on your operating system. Refer to our guide at the beginning of this article to learn how to compress or extract files on a Windows, macOS, Linux, iOS, or Android device.
How do I extract highly compressed files?
Use a compression program like 7-Zip or WinRAR. These tools support diverse file formats and allow easy extraction.
How do I extract all compressed files?
Select all files, right-click, and choose Extract All or an equivalent option.
Bottom line
Knowing how to compress and extract files is very useful when you want to save storage space on your device or send and transfer files around. Compressing a file allows you to reduce its size while extracting a file allows you to revert the file to its original size. The same concept applies when compressing and extracting folders.
Mastering file compression and extraction is your key to smart data management — saving space and streamlining file transfers has never been easier. But don't let your guard down; safeguard your digital journey. Upgrade your security with the best antivirus software with VPNs.