The short answer
- ZIP is a cross-platform archive format that stores one or more files in a single container, with individual members optionally stored, compressed, encrypted, or digitally signed.
- Use the ZIP support included with Windows or macOS, or a ZIP-capable Unix utility, to inspect or extract the archive. Support varies because applications often implement only part of the specification. Archives using less common compression, encryption, ZIP64, extensions, or split-volume features may require another compatible ZIP tool. Keep the original archive before extracting or converting it.
- A regular ZIP is a container rather than an automatically executing format, but it can hold files of arbitrary types, and a self-extracting ZIP includes platform-specific extraction code. For an untrusted archive, inspect member types, validate every destination path, and limit each member's extracted size, total extracted size, member count, disk use, memory use, and processing time. These controls reduce path-traversal and ZIP-bomb risks. CRC-32 detects extraction errors but does not prove authenticity or protect against malicious modification.
ZIP Archive: What It Is and How to Open It
A ZIP archive normally contains a local header and data for each member, followed by a central directory and one end-of-central-directory record. Multibyte values are generally little-endian. A common nonempty ZIP starts with 50 4B 03 04; an empty archive may start with 50 4B 05 06, while 50 4B 07 08 can identify the first segment of a split archive and is also used by some implementations as a data-descriptor marker. Its registered media type is application/zip.
Extraction restores member contents but removes the ZIP container layer. Repacking into another archive format may lose ZIP-specific compression methods, comments, extra fields, encryption, digital signatures, central-directory metadata, or split-volume layout when no equivalent exists. Preserve the original ZIP before conversion.
How to open it
Use the ZIP support included with Windows or macOS, or a ZIP-capable Unix utility, to inspect or extract the archive. Support varies because applications often implement only part of the specification. Archives using less common compression, encryption, ZIP64, extensions, or split-volume features may require another compatible ZIP tool. Keep the original archive before extracting or converting it.
Use the ZIP support included with Windows or macOS, or a ZIP-capable Unix utility, to inspect or extract the archive. Support varies because applications often implement only part of the specification. Archives using less common compression, encryption, ZIP64, extensions, or split-volume features may require another compatible ZIP tool. Keep the original archive before extracting or converting it.
Extraction restores member contents but removes the ZIP container layer. Repacking into another archive format may lose ZIP-specific compression methods, comments, extra fields, encryption, digital signatures, central-directory metadata, or split-volume layout when no equivalent exists. Preserve the original ZIP before conversion.
File safety
A regular ZIP is a container rather than an automatically executing format, but it can hold files of arbitrary types, and a self-extracting ZIP includes platform-specific extraction code. For an untrusted archive, inspect member types, validate every destination path, and limit each member's extracted size, total extracted size, member count, disk use, memory use, and processing time. These controls reduce path-traversal and ZIP-bomb risks. CRC-32 detects extraction errors but does not prove authenticity or protect against malicious modification.
An unknown sender, a name ending in two extensions, or contents that do not match the extension — check before you open it.
Converting it
Extraction restores member contents but removes the ZIP container layer. Repacking into another archive format may lose ZIP-specific compression methods, comments, extra fields, encryption, digital signatures, central-directory metadata, or split-volume layout when no equivalent exists. Preserve the original ZIP before conversion.
Convert a copy, never the original, then compare quality, metadata, and layout against what you started with.
Common questions
What is a ZIP archive and what is it used for?
A ZIP archive is a cross-platform container maintained by PKWARE for storing and transferring one or more files as one item. Each member can be stored unchanged or handled with supported compression, encryption, or digital-signature features.
How do I open a ZIP file?
Open it with ZIP support provided by your operating system or another ZIP-capable utility, then inspect or extract its members. If it uses an unsupported compression method, encryption scheme, ZIP64 extension, or split layout, try a tool that supports that specific feature.
How do I open a ZIP file on Windows 11?
Right-click the ZIP and select Extract All, or double-click it to browse the archive as a folder. If it is encrypted, split, ZIP64-based, or uses a less common method that Windows does not handle, use a compatible ZIP utility and retain the original file.
How do I open a ZIP archive on macOS?
Double-click the ZIP in Finder; macOS normally expands it beside the original archive. If extraction fails, the file may be damaged or may use encryption, compression, ZIP64, or split-volume features not supported by that implementation; use a compatible ZIP tool without overwriting the original.
Why does my ZIP file appear corrupted or refuse to extract?
The archive may be incomplete or damaged, or the chosen tool may not support its compression method, encryption, ZIP64 fields, extensions, or split segments. Preserve the original, confirm that all segments are present, and retry with a compatible implementation before assuming the member data is lost.
What is the difference between ZIP and ZIP64?
ZIP64 extends traditional ZIP fields when file sizes, offsets, or member counts no longer fit. A file size above 0xFFFFFFFF must use the ZIP64 eight-byte size value, but older ZIP tools may not understand these extensions.
What can be lost when I convert ZIP to another archive format?
The member contents may survive, but ZIP-specific compression methods, comments, extra fields, encryption, digital signatures, central-directory metadata, and split-volume layout may have no equivalent and can be lost. Keep the original ZIP.
Is a ZIP file received by email safe to extract?
Its ZIP container alone does not establish safety. It may contain executable or active files, malicious paths, or highly compressed data designed to exhaust resources. Inspect member types, validate extraction paths, and enforce size, count, disk, memory, and time limits.
What signature bytes and MIME type identify a ZIP file?
The registered media type is application/zip. Common signatures are 50 4B 03 04 for a nonempty archive, 50 4B 05 06 for an empty archive, and 50 4B 07 08 for the first segment of some split archives; signatures identify structure, not trustworthiness.
Does a valid ZIP CRC-32 prove that the archive is authentic and safe?
No. CRC-32 helps detect errors in extracted member data, but it is not protection against malicious modification and does not authenticate the source. Use a supported digital signature or another external authentication mechanism when provenance matters.
Related formats
Sources
APPNOTE.TXT — .ZIP File Format Specification, Version 6.3.9 · PKWARE(格式维护者的官方规范正文)
Registration of application/zip · IANA(官方媒体类型注册条目)
ZIP File Format (PKWARE) · 美国国会图书馆数字格式可持续性项目
Best practices for ZIP and TAR archives · Microsoft Learn(官方归档处理与安全指南)