FileExamples
.zip

ZIP File Format

ZIP is the most popular archive format for compressing and bundling multiple files into a single package.

Extension .zip
MIME application/zip
Magic Bytes PK (50 4B 03 04)
Encoding Binary with optional UTF-8 filenames
Compression Deflate (default), Store, LZMA, Bzip2, Zstd
Spec APPNOTE.TXT (PKWARE) — public domain
Max Size 4GB per file / 4GB archive (16 EB with ZIP64)

Sample ZIP Files

View all
File NameSizeDescriptionAction
Project Backup1.5 MBDownload
SCORM Package500 KBDownload
SCORM Package2 MBDownload

Overview

ZIP is the world's most widely used archive format, allowing multiple files and directories to be compressed and bundled into a single file. Each file in a ZIP archive can be compressed independently using different methods (typically Deflate), enabling selective extraction without decompressing the entire archive. ZIP supports encryption (AES-256 in modern implementations), file comments, and Unicode filenames. It is built into Windows, macOS, and most Linux distributions, making it the universal choice for file distribution.

History

The ZIP format was created by Phil Katz in 1989 and originally implemented in his PKZIP utility for MS-DOS. The format specification was placed in the public domain, leading to wide adoption. WinZip (1991) popularized ZIP on Windows. The format has been enhanced over time with ZIP64 extensions for files over 4GB, AES encryption, and LZMA/Bzip2 compression methods. In 2023, PKWARE transferred the specification to the Library of Congress for long-term preservation.

File Structure

A ZIP file contains: local file headers (one per entry with filename, CRC, compressed size), compressed file data, an optional data descriptor, and a central directory at the end listing all entries with byte offsets. The end-of-central-directory record marks the archive terminus. This structure allows appending files without rewriting the entire archive and enables fast listing of contents by reading only the central directory.

Common Use Cases

  • Compressing files for email and transfer
  • Software distribution and deployment packages
  • Backup and archival of file collections
  • Bundling web assets (DOCX, XLSX, EPUB are ZIPs)
  • Application packaging (Java JAR, Android APK)
  • Data export from web applications
  • Batch file downloads
  • Source code distribution

Advantages

  • Universal support — built into all major OS
  • Individual file compression enables selective extraction
  • Supports AES-256 encryption
  • No royalties or patents — public domain specification
  • ZIP64 supports files and archives over 4GB
  • Fast random access to individual files

Disadvantages

  • Deflate compression is not the most efficient (vs LZMA/Zstd)
  • Legacy ZIP encryption (ZipCrypto) is weak and crackable
  • No solid compression (each file compressed independently)
  • Max 65,535 files without ZIP64 extensions
  • Filename encoding issues with non-ASCII characters in older tools

Frequently Asked Questions

What is a ZIP file?

A ZIP file is a compressed archive that bundles one or more files and folders into a single file for easier storage, transfer, and distribution. Most operating systems can create and extract ZIP files natively.

How do I open a ZIP file?

Double-click the ZIP file on Windows, macOS, or Linux to extract it. You can also use tools like 7-Zip, WinRAR, PeaZip, or the command-line unzip utility.

ZIP vs RAR — which is better?

ZIP has universal support (built into every OS) and is royalty-free. RAR typically achieves better compression ratios with solid compression. Use ZIP for compatibility; use RAR or 7z for maximum compression.

Can I password-protect a ZIP file?

Yes. Use 7-Zip, WinRAR, or macOS Terminal to create encrypted ZIP files. Use AES-256 encryption (not the weak ZipCrypto) for real security.