Fixes

How to Password Protect a Zip File on Mac and Windows

On a Mac, open Terminal and make the zip with the built-in tar command and its zip:encryption=aes256 option, which gives a zip with AES-256 encryption; the older zip -e makes a kind that the Mac's own help calls weak. On Windows, Microsoft says Windows 11, version 24H2 does not support encrypted archive files, so use 7-Zip and set Encryption method to AES-256.

By the Loop teamUpdated 23 November 202612 min read

To password protect a zip file, run the Mac's built-in tar command with the AES-256 option, or on Windows use 7-Zip set to AES-256; with either, the file names inside the zip stay visible and only the contents are locked. We tested that on a Mac, and the section on file names shows how. We ran every Mac command below on macOS 27.0.1 with throwaway files. We did not test anything on Windows, because we have no Windows machine, so the Windows steps come from the tools' own pages and source code.

Mac Terminal

A Mac can make two kinds of password zip, and the Terminal commands differ. Apple's guide to zipping on Mac has no password step for Finder's Compress. Our zip guide covers the basic steps.

The stronger kind. The Mac's built-in tar command can write a zip with AES-256 encryption. Its manual (type man bsdtar in Terminal) lists zip:encryption=aes256 as "WinZip AES-256 encryption". This is the command we ran, split over several lines so it fits a phone screen. The backslash at the end of a line tells Terminal the command goes on:

tar --format zip \
  --options \
  zip:encryption=aes256 \
  -cf name.zip \
  FolderName

Here name.zip is the new file and FolderName is the folder. Terminal then showed Enter passphrase: once. It did not ask a second time to confirm, so a typo locks the zip for good. Open the zip on a copy before you delete anything. The zip we made stored its files with compression method 99, which is the marker for WinZip's AES encryption.

Do not add --passphrase when you make the zip. The manual warns about how insecure that option is. Like zip's -P, it puts the password on the command line, where history and the process list can show it.

The older kind. The zip command asks for the password twice:

zip -er name.zip FolderName

The -e means encrypt and -r means include everything inside the folder. We ran this one too: Terminal showed Enter password: and then Verify password:. But the Mac's own help (type zip -h2 in Terminal) describes -e as "standard (weak) PKZip 2.0 encryption". The manual (type man zip) marks -P, which puts the password in the command, as "THIS IS INSECURE!" and says that where security truly matters you should use something stronger than the relatively weak standard encryption that zip tools provide.

Mac Apps

Two Mac apps make a password zip with a menu instead of Terminal.

We did not open either app. Their menu labels come from their own pages, so check them in the app.

Windows

Microsoft's zip page says Windows 11, version 24H2 compresses and decompresses several archive formats, but "does not support operations on encrypted archive files". It suggests non-Microsoft apps such as 7-zip or WinRAR, and it lists no password step for a zip. So Microsoft's page names no built-in way to add a password. We did not test Windows, and we cannot say what older versions of Windows do.

7-Zip. 7-Zip is free software with open source, and its home page says it offers AES-256 encryption in 7z and ZIP formats. Its live site did not load for us on 2 November 2026, so the links here go to archived copies; it loaded on 23 November 2026 and said the same. The steps below come from 7-Zip's source files, CompressDialog.cpp and its .rc file with the label text, and the menu text in resource2.rc, which build the menu and window, not from a run on Windows:

  1. Right-click the file or folder and open the 7-Zip submenu.
  2. Choose Add to archive... The window that opens is titled Add to Archive.
  3. Choose Zip as the archive format.
  4. Type the password in Enter password: and again in Reenter password:.
  5. In Encryption method:, choose AES-256.

For the Zip format the source lists ZipCrypto first and then AES-256, and it picks ZipCrypto unless an earlier choice began with "aes". So check the list each time. 7-Zip's version history says it has supported WinZip-compatible AES-256 for zip files since a 2006 beta.

WinRAR. WinRAR's download page offers a trial and lists "Safe 256-bit AES Encryption". We could not read a price, and we did not check which encryption it uses for a zip.

Open It

The person you send to needs the password and a program that can read the kind of zip you made. Send the password another way, such as a call or a text message, not in the same email.

The tar way to open an AES zip, which worked for us:

tar -xf name.zip -C EmptyFolder

Here EmptyFolder is a new, empty folder. We ran it on our AES zip: Terminal printed Enter passphrase:, and the files came out after we typed the password. A wrong passphrase printed "Incorrect passphrase" in an earlier test, where we passed it with the --passphrase option; leave that option out, because it puts the password in your command history.

File Names

A zip password locks the contents of the files but not their names. We checked both kinds on a Mac with a folder holding two small text files:

Some guides tell 7-Zip users to tick Encrypt file names for a zip. In 7-Zip's source, that box is switched on only for the 7z format, not for Zip. Keka's wiki says the same: the option is on by default for 7z and not available for zip. BetterZip's page says header encryption, which hides names, is only available with 7-zip and rar archives. So to hide names, choose 7z. A 7z file is not a zip, so ask the recipient to install 7-Zip, Keka or BetterZip. We did not test opening one with a double-click.

On a Mac there is a second route, an encrypted disk image, which hid the names in our test. See how to password protect a folder on Mac for those steps, and how to password protect a PDF for one file. It makes a Mac-only .dmg, and Google's list of blocked attachments includes .dmg.

Email

Google says Gmail does not allow "Password-protected archives with archived content", so a password zip may be refused in a Gmail message. The same page says Gmail often updates the file types it blocks, and suggests uploading the file to Google Drive and sharing that. The page lists no .7z type, and it does not say whether a password 7z counts as a password-protected archive, so we cannot say. For the size limits that apply as well, see our guides to sending a folder by email and Mail Drop.

A password on a link is a different lock. It guards the web page where someone downloads the file. It does not change the file, and it does not hide anything inside it. If you send a link, you can leave the zip without a password, or keep one on the zip as well.

Dropbox's plans page, from an archived US copy of 2 November, lists "Password protect files" under Standard, not Plus. Standard is $15 a user a month billed yearly, which is $180 a year.

Loop

Loop is a Mac app that turns files into your own links, and it is not a zip tool. It does not make a zip on your Mac or put a password inside one, and it runs on a Mac on your side only. A folder link does offer readers a Download All zip, which Loop builds for them and which has no password of its own. What it adds is a Password on the link that carries the zip. It is a gate on the page, not encryption, and it does not protect the zip on your own Mac.

What a reader sees:

Loop stores a salted hash of the password, never the password. It does not send the password for you, so tell the reader another way. A zip you drop is shared as a plain file, and a zip with its own password stays as you made it. As far as we can tell from Loop's code, it does not open or change the zip, so the reader still needs the zip's password after downloading; we did not run that case today. A zip with an index.html at its top, or inside its one top folder, is offered as a Website unless you hold Option while dropping and choose Files.

You can set an expiry of 1, 7, 30 or 90 days, but it is optional and defaults to Never. Loop shows a Mac notification once for each reader's browser for each link, only while Loop is running. It sends no email or phone alert. We do not promise a maximum file size.

Try Loop free for 14 days

Your own branded link, with notes on the exact second. $49 once.

Download for Mac

Limits

How We Tested

On 2 November 2026 we ran the Mac commands on macOS 27.0.1, driving the password prompts through a pseudo-terminal, with throwaway text files in a scratch folder. tar with zip:encryption=aes256 asked for a passphrase once and stored the files with compression method 99, the WinZip AES marker; the Mac's unzip could not open that zip ("unsupported compression method 99"), and tar -xf could. zip -er asked for the password twice. For both kinds, unzip -l listed the file names without a password, and a search of the raw zip found the file text 0 times and the names 4 times. We re-ran these commands on 23 November 2026 with the same results. We did not test Windows, Finder's double-click or either Mac app.

Last tested: 23 November 2026

Cost

ToolWhat it doesCost, one person
Mac tarAES-256 zip, built inOn our Mac; no Apple price
Mac zipOld encryption, built inOn our Mac; no Apple price
7-ZipAES-256 zip or 7zFree
KekaAES-256 7z, MacSite: no price; App Store $6.49
BetterZipAES-256 zip, 7z$35, major upgrades extra
Dropbox StandardPassword on a link$180 a year
LoopPassword on a link$49 once

These are US dollars for one person, read on 23 November 2026, and we could not confirm whether tax is included. Dropbox is $15 a month billed yearly, which is $180, from an archived US copy of its plans page. Keka's $6.49 is the Mac App Store price, and its website shows a download button and donation buttons but no price. The tar and zip commands were on our Mac running macOS 27.0.1, and no Apple page states a price for them. 7-Zip says you do not need to register or pay, and BetterZip's home page lists $35. We could not read WinRAR's or WinZip's prices, so they are not in the table.

The zip you share this way is kept in your own Cloudflare account, free up to 10 GB. After that Cloudflare bills you at $0.015 per GB-month, per its pricing page (updated 30 October 2026), which lists no data-transfer charge. A month of 100 GB is about $1.35 for storage alone once the free 10 GB is used, and Cloudflare also charges per request above its free monthly allowance.

You can try Loop on a zip link for 14 days from first run without paying. A small "Shared with Loop" badge shows on the download page during the trial, and a license, $49 once for one person, takes it away.

FAQ

Password protecting a zip file, answered.

Open Terminal and run the tar command shown under Mac Terminal above, with zip:encryption=aes256 as the option. It asks for a passphrase once, so type it carefully and open the zip on a copy to test it. The older zip -er name.zip FolderName asks twice but, by the Mac's own help text, uses weak PKZip 2.0 encryption. Finder's Compress has no password step, per Apple's guide.

Microsoft's page says Windows 11, version 24H2 does not support operations on encrypted archive files and suggests 7-zip or WinRAR. In 7-Zip, right-click the file, open the 7-Zip submenu, choose Add to archive..., choose Zip, type the password twice and set Encryption method: to AES-256. We did not test Windows.

The contents are locked, but the file names are not: in our test unzip -l listed every name with no password, for both the old and the AES kind. The old kind is called weak by the Mac's own help and by BetterZip, so use AES-256 and a long password.

Not with zip's own encryption, in the tools we read. In 7-Zip's source code the Encrypt file names box is on for its 7z format only, and Keka's wiki says the option is not available on zip. Use 7z, or an encrypted disk image on a Mac, and tell the recipient what opens it.

ZipCrypto is the old standard zip encryption, which the Mac's zip help calls weak. AES-256 is the stronger one, and our Mac zip stored it with compression method 99. 7-Zip's Zip window offers both and lists ZipCrypto first.

On a Mac, the old kind should open with a double-click, but we did not test that. For an AES zip, BetterZip says Archive Utility opens it, Keka says macOS 10.15 or newer or a third-party app does, Apple's pages do not say, and the Mac's unzip command failed with "unsupported compression method 99" while tar -xf worked and asked for the passphrase. On Windows, tell them to install 7-Zip.

Google says Gmail does not allow password-protected archives with archived content, and its blocked list includes .dmg too. Send a link instead, and send the password by another route.

7-Zip says you do not need to pay for it. The Mac's tar and zip were on our Mac, and Apple's pages state no price. Keka's website shows no price ($6.49 on the Mac App Store) and BetterZip is $35 with major upgrades extra. For a password on a link, Dropbox Standard costs $180 a year; Loop costs $49 once, after a 14-day trial.

From each vendor's own pages and source, read on 23 November 2026. The Terminal facts are from the zip, unzip and tar manuals built into macOS 27.0.1, and from a small test on a Mac with throwaway files. We did not test Windows. The Windows and email limits are from Microsoft and Google, whose pages print no date. The 7-Zip facts are from its source code and an archived home page of 26 October, because its site did not load on 2 November; it loaded on 23 November and said the same. Mac apps are from Keka and BetterZip, and Keka's wiki pages print edit dates, from June 2017 to June 2026. Dropbox's price is from an archived plans page and Cloudflare's from its pricing page. Apple's guide pages print no date.

We could not confirm whether Finder's double-click opens an AES zip, whether any version of Windows Explorer opens either kind, which Windows versions opened old password zips, 7-Zip's manual text (we read its source), WinRAR's and WinZip's prices and defaults, whether a password 7z counts as a password-protected archive for Gmail, how Keka's and BetterZip's windows look today, or what tar adds when you zip a real folder with hidden Mac files.

We could not confirm whether tax is included in any price.

Try Loop free for 14 days.

Pay once. Yours forever.