Utilities9 min readUpdated 2026-09-14

How to Zip a File on Windows, Mac, iPhone and Android

Tools mentioned in this guide

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.

  1. Open File Explorer and find the file or folder you want to zip.
  2. To zip several items at once, hold Ctrl and click each one, or drag a selection box around them.
  3. Right-click the selection.
  4. On Windows 11, choose Compress to ZIP file. On Windows 10, choose Send to, then Compressed (zipped) folder.
  5. 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.

  1. Open Finder and select the file or folder.
  2. For multiple items, hold Command and click each one.
  3. Right-click (or Control-click, or two-finger click) the selection.
  4. Choose Compress — it will read Compress "filename" for one item, or Compress 3 Items for several.
  5. 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 ProjectFiles

We 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

  1. Open the Files app and navigate to the file.
  2. Tap Select in the top right, then tap each file you want.
  3. Tap the More button (the circle with three dots) in the bottom right.
  4. 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

  1. Open Files by Google (or your manufacturer's file manager).
  2. Long-press a file to select it, then tap any others.
  3. Tap the three-dot menu and choose Compress or Zip.
  4. 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 typeBeforeAfterSaved
Plain text (.txt)72,000 bytes745 bytes99.0%
500 small text files2,000 KB206 KB89.7%
Spreadsheet data (.csv)104,970 bytes29,523 bytes71.9%
Word document (.docx)48,803 bytes46,836 bytes4.0%
An existing .zip511,607 bytes497,538 bytes2.7%
JPEG photo481,698 bytes481,193 bytes0.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.pdf

Do 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 folder instead 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?
It depends entirely on the file type. In our measurements a plain text file fell by 99.0% and a CSV by 71.9%, but a JPEG fell by 0.1% and an existing .zip by 2.7%. Text, code, spreadsheets and logs compress dramatically. Photos, video, audio and Office documents are already compressed and barely move.
How do I zip a file on Windows 11?
Right-click the file or folder and choose Compress to ZIP file. Windows 11 moved this to the top level of the right-click menu; on Windows 10 the same function lives under Send to → Compressed (zipped) folder. Nothing needs installing on either version.
Why is my zip file the same size as the original?
Because the file was already compressed. JPEG, PNG, MP3, MP4 and PDF all compress themselves, and .docx, .xlsx and .pptx are literally zip archives already — we opened a .docx and found 17 files inside it. Zip finds no repetition left to remove. To actually shrink a photo use our Image Compressor; for a PDF use Compress PDF.
Can I zip a file on my phone without an app?
Yes on both platforms. On iPhone or iPad, open the Files app, long-press the file and tap Compress. On Android, open Files by Google, long-press the file, then use the three-dot menu and choose Compress. Photos need to be saved into Files first on iOS — there is no Compress option inside the Photos app.
What is the difference between ZIP and RAR?
ZIP is an open format every operating system can create and open. RAR is proprietary — free to extract, but creating one requires licensed software from its developer. RAR usually compresses a little tighter and has better recovery-record support, but ZIP wins on universality. Send a ZIP unless you have a specific reason not to. Windows 11 can open RAR files natively since the 23H2 update, though it still cannot create them.
How do I zip a PDF to make it smaller?
Zipping a PDF usually achieves close to nothing, because PDFs compress their own streams. Zip it only when you need to bundle several PDFs into one attachment. To genuinely reduce the size, compress the PDF itself with Compress PDF, which re-encodes the images inside it — the part that is actually large. Our guide on compressing a PDF for email walks through getting under a specific limit.
Why does my zip contain a __MACOSX folder?
It is macOS metadata — a hidden companion file for each real file, storing extended attributes that other platforms do not use. Windows and Linux users see them as junk. Zipping the same 3-file folder two ways, the metadata-preserving method produced 9 entries while the plain Terminal command 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?
The original 1989 format capped archives and individual files at 4 GB and at 65,535 entries. The ZIP64 extension removed those limits and every current tool — Windows, macOS, 7-Zip, Keka — uses it automatically when needed. In practice the real limit is whatever you are sending it through: Gmail caps attachments at 25 MB, Outlook.com at 20 MB, and both measure the encoded size, which runs about a third larger than the file on disk.
Can I password-protect a zip file for free?
Yes, but check what you are getting. Neither Windows Explorer nor macOS Finder can create one. The built-in macOS command 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.