Skip to content
Private: files never leave your device

ZIP File Size Limit: Format Limits and Upload Caps

There are two kinds of ZIP limit. The format itself has hard ceilings set by the size of its fields, and the services you send a ZIP to have their own caps. This page lists both, from the ZIP specification and the services' own documentation.

ZIP limits from the specification: classic ZIP fields cap files and archives at about 4 GB and 65,535 entries, ZIP64 uses 64 bit fields, and Gmail caps attachments at 25 MB

The classic ZIP format is limited to 4,294,967,295 bytes (just under 4 GiB) per file, per archive offset and for the central directory, and to 65,535 files per archive, because those values are stored in 4 byte and 2 byte fields. The ZIP64 extension stores them in 8 byte fields instead, which lifts these limits far beyond any real file. Each figure below comes from the PKWARE ZIP specification, APPNOTE version 6.3.9, read on 21 November 2026.

ZIP format limits

What is limitedClassic ZIP fieldLargest valueWith ZIP64
Compressed size of one file4 bytes4,294,967,295 bytes (0xFFFFFFFF)8 byte field
Uncompressed size of one file4 bytes4,294,967,295 bytes8 byte field
Offset of a file inside the archive4 bytes4,294,967,295 bytes, so data past about 4 GiB cannot be addressed8 byte field
Size of the central directory4 bytes4,294,967,295 bytes8 byte field
Number of entries in the archive2 bytes65,535 (0xFFFF)8 byte field
File name length2 bytes65,535 bytesUnchanged
Archive comment length2 bytes65,535 bytesUnchanged

The 4 GiB ceiling applies to the original file as well as the compressed one. A 5 GB video that compresses to 4.8 GB, or a 6 GB log file that compresses to 1 GB, both need ZIP64, because the uncompressed size field has to hold the original size too.

How ZIP64 works

The specification says sizes should be stored in ZIP64 format, as 8 byte values, when a file is larger than 0xFFFFFFFF bytes, and that ZIP64 may be used for any file regardless of size. When a classic field cannot hold a value, the tool writes 0xFFFF or 0xFFFFFFFF there as a marker and puts the real value in a ZIP64 extra field or the ZIP64 end of central directory record.

A program that reads the archive must support version 4.5 of the specification, which the APPNOTE lists as the version for files that use ZIP64 format extensions. An older or simpler unzip tool that stops at version 2.0, the level for ordinary Deflate files, may refuse a ZIP64 archive or report it as damaged, even though nothing is wrong with it.

Over 4 GB or 65,535 files? Check the receiving tool. Your archiver will usually switch to ZIP64 automatically. The risk is at the other end: confirm that whoever opens the file has a tool that supports ZIP64, or split the set into several smaller archives.

Upload and attachment caps for ZIP files

Services rarely care about the ZIP format limit, because their own caps are much lower. These are the figures stated on the pages we read.

ServiceLimit statedNotes
Gmail, personal accounts25 MB total attachmentsOver the limit, Gmail replaces the attachment with a Google Drive link. Work and school limits are set by the administrator
Gmail, any accountBlocks certain file types even inside a ZIPIncludes .exe, .msi, .bat, .js, .jar, .dmg, .iso and others, plus password protected archives with archived content
AWS Lambda deployment package50 MB zipped, uploaded through the API, SDKs or console250 MB for the unzipped contents, including layers and custom runtimes; larger zipped files go through Amazon S3
Other email providersVariesSee our email attachment size limits page
Cloud storageVaries by service and planSee Google Drive, Dropbox and OneDrive limits

The Gmail block surprises people: zipping a program does not get it past the filter, because Gmail looks inside archives. Password protecting the archive does not help either, since Gmail also blocks password protected archives with archived content.

Worked examples

SituationWhich limit appliesWhat to do
Folder of 3 GB of photos to a friendNeither format limit; email capsShare a cloud storage link
Single 4.5 GB video in a ZIP4 GiB per file in classic ZIPUse a tool that writes ZIP64, or send the video directly through cloud storage
Backup of 80,000 small files65,535 entries in classic ZIPZIP64, or split into two archives
20 MB ZIP of PDFs to a Gmail addressGmail 25 MBFits, as long as no blocked file type is inside
Script files zipped for emailGmail blocked typesShare through cloud storage or a code repository
60 MB Lambda packageLambda 50 MB direct uploadUpload the ZIP to Amazon S3 and point Lambda at it

Getting under a size cap

Zipping rarely makes photos, video or PDFs much smaller, because those formats are already compressed. Our guide to why a ZIP file is not smaller shows measured results. To shrink the contents, use Compress Image, Compress PDF or Compress Video first, then zip the smaller files if you still want one attachment.

Sources and dates

PageDateUsed for
PKWARE ZIP specification (APPNOTE 6.3.9)Revised 15 July 2020, read 21 November 2026Field sizes, 0xFFFF and 0xFFFFFFFF markers, ZIP64 rules, version 4.5
Gmail Help: attachments and size limitsNo date shown, read 21 November 202625 MB personal limit, Drive link, administrator limits
Gmail Help: blocked file typesNo date shown, read 21 November 2026Blocked types inside archives, password protected archives
AWS Lambda quotasNo date shown, read 21 November 202650 MB zipped, 250 MB unzipped, S3 for larger

Frequently asked questions

What is the maximum size of a ZIP file?

Classic ZIP stops at 4,294,967,295 bytes, just under 4 GiB, for each file and for positions inside the archive. ZIP64 uses 8 byte fields and lifts that limit.

How many files can a ZIP hold?

65,535 in the classic format, because the entry count is a 2 byte field. ZIP64 stores the count in 8 bytes.

Why will a large ZIP not open?

It may use ZIP64, which needs a tool supporting version 4.5 of the ZIP specification. Try a current archiver, or ask the sender to split it.

Can I email a ZIP file through Gmail?

Yes, up to 25 MB for personal accounts, unless it contains a blocked file type such as .exe or .js, or is a password protected archive.

What is the AWS Lambda ZIP limit?

50 MB zipped for a direct upload and 250 MB for the unzipped contents, including layers. Larger zipped packages go through Amazon S3.