FileCompressor

How to Zip a File

Create a smaller, single-file ZIP archive in seconds—directly in your browser with zero installs, or using the built-in tools on Windows, macOS, and the command line.

1. How to zip a file online without installing software

If you are on a managed work laptop, a Chromebook, or a shared workstation—or if you want your PDFs and photos to actually shrink instead of just sitting inside a wrapper—the fastest method runs right inside your web browser:

  1. Open the FileCompressor browser workbench.
  2. Drag and drop one or multiple files (PDFs, JPG/PNG/WebP images, or documents like CSV, TXT, JSON, SVG, and DOCX).
  3. Your browser compresses each file locally using WebAssembly codecs (no upload, no sign-up, no desktop installation).
  4. Click Download all (.zip) to bundle every optimized file into one clean .zip archive ready for email or upload.

Why this beats plain zipping for photos and PDFs: A standard ZIP file uses lossless DEFLATE, which only shaves 1%–5% off already-compressed JPGs or PDFs. Compressing your images or PDFs first with our compress image or reduce PDF size tools—and then bundling them into a ZIP—regularly shrinks a 25 MB attachment down to 4–6 MB.


2. How to zip a file on Windows 11 and Windows 10

Windows includes native ZIP compression in File Explorer—no third-party software required.

On Windows 11

  1. Open File Explorer and locate the file or folder you want to zip. (Hold Ctrl to select multiple files.)
  2. Right-click the selection.
  3. Click Compress to ZIP file (on Windows 11 24H2+, hover Compress to… and select ZIP file; Windows 11 24H2 also supports 7z and TAR natively).
  4. Type a name for the new .zip archive and press Enter.

On Windows 10

  1. Select the file(s) or folder in File Explorer.
  2. Right-click the selection.
  3. Hover over Send to in the context menu.
  4. Click Compressed (zipped) folder.
  5. Rename the newly created .zip file and press Enter.

Tip: Keep archive file names short and avoid special characters like /, :, or * if you plan to email the ZIP to macOS or Linux recipients.


3. How to zip a file on Mac (macOS Finder)

Every version of macOS—from Ventura and Sonoma to Sequoia and newer—builds ZIP creation straight into Finder:

  1. Open Finder and select a single file, a folder, or hold Command (⌘) to select multiple items.
  2. Control-click (or two-finger tap on a trackpad) the selection.
  3. Choose Compress “[filename]” (or Compress N Items for multiple files).
  4. Finder creates a .zip file in the same folder:
    • Compressing one item names it filename.zip.
    • Compressing multiple items names it Archive.zip, which you can rename right away.

Good to know: Finder adds hidden macOS metadata (__MACOSX) inside the archive. If you are sending files to Windows colleagues or uploading to strict web portals, either zip from Terminal with -X (below) or bundle your files cleanly in your browser.


4. How to zip a file from the command line

Command-line archiving gives you exact control over compression level (-9 for maximum DEFLATE), recursion, and excluding junk metadata files.

macOS and Linux (Terminal)

# Zip a single file at maximum compression level 9
zip -9 report.zip report.pdf

# Zip an entire folder cleanly (excluding macOS metadata & .DS_Store)
zip -r -9 -X project.zip ./project-folder -x "*.DS_Store"

Windows PowerShell

# Compress a single file or folder
Compress-Archive -Path ".\report.pdf" -DestinationPath ".\report.zip" -CompressionLevel Optimal

# Compress multiple files
Compress-Archive -Path ".\a.pdf",".\b.png" -DestinationPath ".\bundle.zip"

Windows Command Prompt (built-in bsdtar on Windows 10/11)

tar -a -c -f bundle.zip file1.pdf file2.jpg

5. ZIP archiving vs. real media compression

File type Plain ZIP archive (DEFLATE) Dedicated media compression (FileCompressor)
Plain text, CSV, JSON, HTML, SVG 60% – 85% smaller (lossless) 60% – 85% smaller (DEFLATE L9 ZIP)
Word / Excel / PowerPoint (.docx, .xlsx) 2% – 10% (already ZIP internally) Compress embedded images first, then re-insert
Photos (.jpg, .webp) 0% – 3% (already entropy coded) 40% – 75% smaller via MozJPEG / libwebp
Screenshots & UI (.png) 1% – 6% 60% – 85% smaller via ImageQuant + OxiPNG
PDF with images or scans (.pdf) 3% – 12% 40% – 85% smaller via XObject recompression

Need to shrink files on a computer that won't let you install apps?

Skip desktop installers completely. Open our browser-based file compressor to shrink PDFs and documents locally, or jump straight to compress image for photos and screenshots—everything stays on your device with zero uploads.

Zipping files FAQ

Why did my ZIP file barely get any smaller?

ZIP uses lossless DEFLATE compression, which excels on text, CSV, JSON, HTML, and raw bitmaps (often 60%–85% smaller). However, JPG, PNG, WebP, MP4, and modern PDFs are already internally compressed, so zipping them alone usually reduces size by only 1%–5%. Run them through our browser file compressor first to actually shrink their media payloads.

Do I need WinRAR or 7-Zip just to zip a file?

No. Windows 10, Windows 11, macOS, ChromeOS, iOS, and Android all have built-in ZIP creation, and you can also compress and bundle files directly in your browser without installing anything.

What is the __MACOSX folder Windows users see inside Mac ZIP files?

macOS Finder stores extra filesystem metadata (resource forks and Finder attributes) in a hidden __MACOSX folder when zipping. It is harmless on Windows, or you can avoid it by using the Terminal command zip -r -X archive.zip folder/ or bundling files in your browser.

Can I zip multiple compressed images and PDFs together online without uploading them?

Yes. Drop up to 40 files into the FileCompressor workbench on the homepage—once compression finishes locally in your browser, click Download all (.zip) to export a clean, single ZIP archive.

Does zipping a file reduce image or document quality?

No. Standard ZIP archiving is 100% lossless—extracting the archive restores every byte identically to the original file.