Save space on your laptop and in the cloud by compressing files

Don't let data take up more room than it needs to.
A person working on a laptop.
Christin Hume / Unsplash

Digital storage space is always at a premium, so it’s helpful to know how to pack data into even smaller packages. In short, file compression will allow you to reclaim big chunks of room. 

Both Windows and macOS come with built-in tools to compress your files, and if that doesn’t cut it, there’s also a wealth of third-party programs that will do a more comprehensive job.

How file compression works

The squashing algorithms that file-compressing tools use are sophisticated and powerful, but the principle behind them is easy to grasp. Imagine a file made of seven A’s in a row, which would look like this: “AAAAAAA”. You could compact that to take up less space by replacing those seven characters with something like “7A”. 

Some formats do this automatically. Digital photos and music lend themselves well to quick and easy compression, because a lot of data can be cut without your eyes or ears noticing. This is why file types like JPEG and MP3 can keep your photos and audio light and small.

[Related: Your smartphone photos take up too much space. Here’s how to downsize them.]

When opening a compressed file, the process has to happen in reverse—your device needs to reinterpret “7A” as “AAAAAAA”. This is why these documents take longer to open and why people use compression for files they want to keep around but don’t need to access often. As an added bonus, compressed folders or “archives” allow you to put a mass of data into one compressed package, keeping things neat and tidy.

Compressing files on Windows and macOS

The two main operating systems on the market come with built-in file compression features. In File Explorer on Windows, right-click on a file or folder, then choose Send to and Compressed (zipped) folder to create a newly compressed archive. You can rename it and drag more documents and folders on top of it to add them to the pile. To open a compressed archive and extract its contents, just double-click on it in File Explorer. A new window will open where you’ll be able to see all the files inside and some stats—in the compressed size column, for example, you’ll see how much space you’re currently saving.

Select one or more files, go to the top left of the window, and click Extract To to send them to a specific folder or Extract all to uncompress everything in one go. Alternatively, click and drag files into another File Explorer window or use the usual copy (Ctrl+C) and paste (Ctrl+V) shortcuts to get files out of the archive, uncompressing them along the way.

The process is similar for macOS. Select one or several files or folders in Finder, then Ctrl+click on them and pick the Compress option from the menu. You’ll get a new archive alongside the items you compressed, which you can rename and move around as needed.

To open a compressed archive, all you have to do is double-click on it. The archive won’t go anywhere, but you’ll get a new uncompressed folder holding all your files right next to it in Finder. 

Apple’s operating system won’t allow you to easily add files to a folder that has already been compressed without starting the whole process again. This is one reason why you might want to upgrade to a dedicated utility. 

Other file compression programs

Windows and macOS give you the basics, but other applications offer greater levels of compression, plus extras such as password protection, increased security, and broader archive format support. If you’ve got serious amounts of data to package or you want to save as much space as possible, they’re worth a look. 

WinZip is available for both Windows and macOS, and is one of the oldest and most comprehensive compression tools around. You can try it out for free, but after 30 days, it will set you back $40. It deploys banking-level encryption, connects directly to popular cloud storage accounts such as Dropbox, OneDrive, and Google Drive, and it includes extras such as PDF watermarking for additional document security.

[Related: Cloud storage is cheaper when you know how to share it]

Then there’s WinRAR, a direct rival of WinZip that has been around for decades. It is also $40, but has a longer 40-day free trial. In return for your cash, you’ll get features such as different compression algorithms for different file types, easy splitting of archives, and broad file format support. It’s mainly for Windows users though, with only a command line interface available on Macs.

WinZip and WinRAR are more for commercial or seriously heavy-duty use. But if you don’t want to splurge and still need more than the basics in Windows and macOS, you have a couple of free options.

For Windows there’s the long-time free and open-source 7-Zip. This program doesn’t offer the same wide array of advanced features of WinZip, or an interface that’s quite as user-friendly, but it won’t cost you anything and it supports a variety of file compression formats, including its own 7z file type.

PeaZip is available for Windows and is also completely free to use. The main difference is its interface, which is more stylish and polished than 7-Zip. This is another program that supports a large number of compression formats, and also offers features such as strong encryption and password protection for extra archive security.