How to Zip a File on Windows, Mac, iPhone and Android
Zipping a file takes two clicks and needs nothing installed. On Windows, right-click the file and choose Compress to ZIP file. On Mac, right-click and choose Compress. That is the whole answer, and if that is all you came for, you are done.
The part worth staying for is what happens next. Zip is a container plus a compression algorithm, and the compression only works on files that are not already compressed. We measured it: a 72 KB text file dropped to 745 bytes, a 105 KB spreadsheet dropped by 72%, and a 482 KB JPEG photo dropped by 0.1% — five hundred bytes out of half a megabyte. If you are zipping photos or video to get under an email limit, zipping is not going to save you, and this guide covers what does.
How to zip a file on Windows
Windows has had zip support built in since XP. You never need third-party software for a basic archive.
- Open File Explorer and find the file or folder you want to zip.
- To zip several items at once, hold Ctrl and click each one, or drag a selection box around them.
- Right-click the selection.
- On Windows 11, choose Compress to ZIP file. On Windows 10, choose Send to, then Compressed (zipped) folder.
- A new .zip appears in the same folder with the name highlighted. Type a new name and press Enter.
If you selected a single file, the archive takes that file's name. If you selected several, Windows names it after whichever item you right-clicked, which is rarely what you want — rename it while the field is still highlighted.
Windows 11 also unpacks other formats. Since the 23H2 update, File Explorer can open .rar, .7z and .tar archives natively. It still only creates .zip, so you can receive a .rar and read it, but not make one.
How to zip a file on Mac
macOS has zipped and unzipped natively since OS X 10.3. The menu item is called Compress.
- Open Finder and select the file or folder.
- For multiple items, hold Command and click each one.
- Right-click (or Control-click, or two-finger click) the selection.
- Choose Compress — it will read Compress "filename" for one item, or Compress 3 Items for several.
- The archive lands in the same folder. One file gives you filename.zip; several give you Archive.zip, which you should rename.
If the folder is read-only — a mounted disk image, or a locked network share — the archive is written to your Desktop instead, because Finder cannot write next to the original.
Zipping from Terminal
If you want to script it, or you want an archive without the macOS metadata that Windows users see as junk:
zip -r ProjectFiles.zip ProjectFilesWe ran both paths on the same folder. The ditto -c -k --sequesterRsrc method that macOS uses for resource-fork-preserving archives produced 9 entries for a 3-file folder: the 3 real files, plus a __MACOSX directory holding a ._ sidecar for each one. The plain zip -r command produced 4 entries — just the folder and the 3 files, no sidecars. Those __MACOSX and ._filename entries are the mystery files Windows recipients complain about.
How to zip a file on iPhone, iPad and Android
Both mobile platforms can zip without an app, though the option is buried.
iPhone and iPad
- Open the Files app and navigate to the file.
- Tap Select in the top right, then tap each file you want.
- Tap the More button (the circle with three dots) in the bottom right.
- Tap Compress. The .zip appears in the same folder.
For a single file you can skip Select — just long-press the file and choose Compress from the menu. Photos in the Photos app have to be saved to Files first; there is no Compress option in the photo library itself.
Android
- Open Files by Google (or your manufacturer's file manager).
- Long-press a file to select it, then tap any others.
- Tap the three-dot menu and choose Compress or Zip.
- Confirm, and the archive is written to the same folder.
Android's option varies by manufacturer — Samsung's My Files calls it Compress, some builds omit it entirely. If yours does not offer it, any free file manager from the Play Store will.
What zip actually shrinks — and what it barely touches
Zip uses an algorithm called DEFLATE, which works by finding repeated patterns and storing each one once. Text is full of repetition, so it collapses. Photos, video and audio have already had their repetition squeezed out by their own codecs, so there is nothing left for zip to find.
We measured every row in this table on the same machine, zipping real files:
| File type | Before | After | Saved |
|---|---|---|---|
| Plain text (.txt) | 72,000 bytes | 745 bytes | 99.0% |
| 500 small text files | 2,000 KB | 206 KB | 89.7% |
| Spreadsheet data (.csv) | 104,970 bytes | 29,523 bytes | 71.9% |
| Word document (.docx) | 48,803 bytes | 46,836 bytes | 4.0% |
| An existing .zip | 511,607 bytes | 497,538 bytes | 2.7% |
| JPEG photo | 481,698 bytes | 481,193 bytes | 0.1% |
Two things follow from this. First, a .docx barely compresses because it is already a zip — we opened one and found 17 files inside it, which is exactly what the Office Open XML format is. The same is true of .xlsx, .pptx, .epub, .apk and .jar.
Second, if your problem is a folder of photos or a video, zipping is the wrong tool. Compress the images themselves instead — our Image Compressor will take a real bite out of a JPEG where zip takes none, and Compress PDF does the same for a PDF full of scans. Both run entirely in your browser, so nothing is uploaded. If the images are simply larger than they need to be, resizing them saves more than any compressor will.
Where zip genuinely earns its place is the second row: many small files. Five hundred small text files went from 2,000 KB to 206 KB, and more importantly became one attachment instead of five hundred.
How to unzip a file
Every modern operating system opens .zip without extra software.
- Windows: right-click the .zip and choose Extract All, then pick a destination. You can also double-click to browse the contents without extracting — but files opened this way are read-only copies in a temporary folder, so edits are silently lost. Always extract before editing.
- Mac: double-click the .zip. It expands into a folder beside it, and the original .zip stays where it is.
- iPhone/iPad: in the Files app, tap the .zip once. A folder appears next to it.
- Android: in Files by Google, tap the .zip, then tap Extract.
That Windows double-click trap is worth repeating, because it is the single most common way people lose work with zip files: you open a document straight from the archive, spend an hour editing it, save, and the changes go to a temp directory that Windows later clears.
How to password-protect a zip (and why the built-in option is weak)
Neither Windows File Explorer nor macOS Finder can create a password-protected zip. Both can open one. To make one you need the command line or a third-party tool.
On macOS, the built-in zip command will do it:
zip -e archive.zip secret.pdfDo not rely on this for anything genuinely sensitive. We inspected an archive created that way and read its general-purpose bit flag: 0x0009 — encryption bit set, strong-encryption bit clear. That is legacy ZipCrypto, a stream cipher from 1990 with a well-documented known-plaintext attack. It keeps a casual reader out. It does not stand up to anyone who wants in.
For real protection you want AES-256, which means 7-Zip on Windows or Keka on Mac — note that 7z is not installed on macOS by default, so this is a deliberate install, not a built-in. If the sensitive thing is a PDF, it is simpler to encrypt the document itself: Protect PDF applies AES encryption to the file directly, in your browser, and the recipient needs no special software to open it. And if you need a password worth using, our Password Generator makes one locally.
One limitation applies to every password-protected zip: the file names are not encrypted. Anyone with the archive can list what is inside it without the password. Only the contents are protected.
Common zip problems and how to fix them
- The zip is the same size as the original. You zipped something already compressed — a photo, a video, an MP3, a PDF full of scans, or an Office document. See the table above. Compress the underlying file instead of wrapping it.
- Windows recipients see __MACOSX and ._filename junk. That is macOS metadata. Zip from Terminal with
zip -r name.zip folderinstead of Finder's Compress, which is what we measured producing 4 clean entries rather than 9. - Email still rejects the attachment. Gmail's attachment ceiling is 25 MB and Outlook.com's is 20 MB, and both measure the encoded size, which is roughly 33% larger than the file on disk — so a 20 MB file can fail a 25 MB limit. Use a share link rather than fighting it.
- The archive will not open. Most often it downloaded incompletely. Check the byte size against the source before blaming the file. A partially downloaded zip fails at the end, because the index that lists the contents sits at the end of the file, not the start.
- You need to send a single huge file. Zip cannot split it for you. 7-Zip and Keka can write multi-part archives, but the recipient needs every part.
Frequently asked questions
Does zipping a file actually make it smaller? ▼
How do I zip a file on Windows 11? ▼
Why is my zip file the same size as the original? ▼
Can I zip a file on my phone without an app? ▼
What is the difference between ZIP and RAR? ▼
How do I zip a PDF to make it smaller? ▼
Why does my zip contain a __MACOSX folder? ▼
zip -r name.zip folder produced 4. Use the Terminal command when sending to non-Mac recipients. Deleting the __MACOSX folder after extraction is always safe.Is there a size limit on zip files? ▼
Can I password-protect a zip file for free? ▼
zip -e can, and we verified the result uses legacy ZipCrypto — we read the archive's flag bits and found the strong-encryption bit clear. That algorithm dates from 1990 and has a known attack. For real security use 7-Zip or Keka with AES-256, or encrypt the document directly with Protect PDF. Note that in every password-protected zip the file names stay readable without the password.Ready to try it?
Use the tool right now — free, no signup, no upload.