Fix Unable to Expand Zip on Mac: Step-by-Step
In this article
If you're seeing "Unable to expand" or "Error 21" when trying to unzip a file on your Mac, the quickest fix is to use the built-in Archive Utility or the unzip command in Terminal. This guide walks you through both methods, plus how to handle corrupted downloads and permission issues. You'll need your Mac, the problematic zip file, and (for one method) access to Terminal.
What You'll Need
- Your Mac (any macOS version)
- The zip file that won't expand
- Optional: a second browser or download tool if the file is corrupted
Step-by-Step
- Try double-clicking again. Sometimes the error is temporary. Double-click the zip file in Finder. If it expands, you're done. If not, proceed.
- Use Archive Utility directly. Open Applications > Utilities > Archive Utility. In the menu bar, select Archive Utility > Preferences (or File > Preferences in older macOS). Set "Save expanded files" to "Into same folder as archive" or choose a folder you know you can write to. Then drag the zip file onto the Archive Utility icon in the Dock or into its window. If it expands, the issue was Finder's default handling.
- Use the
unzipcommand in Terminal. Open Terminal (in Applications > Utilities). Typecdfollowed by a space, then drag the folder containing the zip file into the Terminal window to paste its path. Press Return. Then typeunzip filename.zip(replacefilename.zipwith the actual name) and press Return. If you get a password prompt, enter the password (it won't show as you type). If it succeeds, the files will appear in the same folder. - Check if the zip is actually a different format. Some files have a .zip extension but are actually 7z, rar, or tar. Use the
filecommand in Terminal:file filename.zip. It will tell you the real type. If it's not a zip, you'll need a tool like The Unarchiver (free from the Mac App Store) or the built-intarcommand for tar files. - Re-download the file. If the zip is corrupted (common with interrupted downloads), delete it and download again. Use a different browser or a download manager like Safari's built-in downloader. If the file is from a website, try downloading it with a different browser (e.g., Chrome instead of Safari) to rule out browser cache issues.
- Check file permissions. If the zip is on a network drive or external disk, copy it to your Desktop first. Then right-click (or Control-click) the zip file, select Get Info, and under Sharing & Permissions, make sure your user has Read & Write access. If not, click the lock icon, change the permission, and try again.
- Use the command line with verbose output. If
unzipfails, rununzip -v filename.zipto list the contents without extracting. If that works, tryunzip -o filename.zipto overwrite existing files. If you see a specific error like "End-of-central-directory signature not found," the file is definitely truncated or corrupt. - Try a third-party unarchiver. If all else fails, download a free tool like The Unarchiver from the Mac App Store. It handles many archive formats and often bypasses macOS's strict checks. Open The Unarchiver, set it as the default for zip files, then double-click the zip again.
Common Mistakes
- Assuming the file is a zip when it isn't. Many files are mislabeled. Always check with
filecommand. - Not waiting for the download to finish. If you double-click a partially downloaded file, it will fail. Check the download status in your browser.
- Using a corrupted download. If the file size seems too small or the download was interrupted, re-download.
- Ignoring password protection. Some zips require a password. If you don't have it, you'll get an error.
- Extracting to a location you can't write to. If you're extracting to a system folder or a read-only volume, you'll get a permission error. Extract to your Desktop or Documents instead.
Tips
- Always verify the source. If the zip is from an untrusted website, be cautious. macOS may block it for security reasons. Right-click the file and select Open to bypass the Gatekeeper warning if you trust the source.
- Use the built-in Archive Utility for standard zips. It's fast and reliable. If it fails, the file is likely corrupt.
- Keep your Mac updated. Sometimes bugs in the Archive Utility are fixed in macOS updates. Check System Settings > General > Software Update.
- If you're a frequent zip user, install The Unarchiver. It's free, open-source, and handles more formats than the built-in tool.
Troubleshooting
If the steps above didn't work:
- Restart your Mac. This clears temporary glitches in the Finder and Archive Utility.
- Check if the file is actually a zip. Open Terminal and type
file /path/to/file.zip(drag the file into Terminal to paste the path). If it says "Zip archive data," it's a real zip. If it says "HTML document" or "gzip compressed data," it's not a zip. - Try a different extraction tool. If The Unarchiver also fails, the file is likely beyond repair. You may need to contact the sender or re-download from a different source.
- Check for disk errors. If you're extracting to an external drive, try copying the zip to your internal drive first. If the external drive has errors, macOS may fail to write. Run First Aid in Disk Utility (Applications > Utilities > Disk Utility) on the drive.
- If you see "Error 21" specifically, it often means the zip is corrupted or the file is not a valid zip. Re-download and try again.
- If the zip is from an email attachment, ask the sender to re-send it, as the file may have been mangled by the email server.
Frequently Asked Questions
Why does my Mac say "Unable to expand" even though the file is a zip?
This usually means the zip file is corrupted or incomplete. The Archive Utility is picky about the zip structure. Re-download the file or ask the sender to re-zip it.
Can I force macOS to expand a zip file?
There's no built-in "force" option, but using the unzip command in Terminal with the -o flag (overwrite) can sometimes bypass minor issues. If the file is severely corrupted, no tool can recover it.
What is the "End-of-central-directory signature not found" error?
This is a common error from the unzip command. It means the zip file is truncated—the end of the file is missing. The file was not fully downloaded or was cut off during transfer.
How do I extract a zip file that has a password?
Double-click the file and enter the password when prompted. In Terminal, use unzip -P password filename.zip (replace password with the actual password) or just unzip filename.zip and enter it when asked.
Why does my Mac block the zip file for security?
macOS Gatekeeper may block files downloaded from the internet if they're from an unidentified developer. Right-click (or Control-click) the file and select Open to override this. Only do this if you trust the source.
Can I repair a corrupted zip file on a Mac?
Sometimes you can use the zip -F command in Terminal to attempt a fix: zip -F damaged.zip --out repaired.zip. This works for minor corruption. If it fails, the file is beyond repair.