How to decode Base64 to a ZIP file
- Paste the Base64 into Base64 or data URI, or open a text file holding it with Open .txt file.
- The summary shows the number of files and folders, the unpacked size with the share saved by compression, the archive comment if there is one, and whether the archive uses ZIP64 or contains protected entries.
- The table lists each entry with Size, Packed size and Modified date, plus View and Save buttons.
- Press Download file to save the archive itself.
Up to 500 entries are listed; for bigger archives a line says how many more there are. Nothing is unpacked until you press a button, and all of it happens in your browser. The page’s Content Security Policy forbids network requests other than Cloudflare’s page-view count, so the archive cannot be uploaded.
Opening a single file from the archive
View unpacks one entry and previews it below the table: images, PDFs, audio and video, text and JSON, even a ZIP inside the ZIP, down to three levels. Save downloads that one file under its own name, without the folder path. Each extracted entry is checked against the CRC-32 stored in the archive, and a mismatch is reported as “Checksum mismatch: this entry is damaged.”
The listing copes with archives that ordinary readers stumble over:
- ZIP64 archives, used for files over 4 GB or more than 65,535 entries.
- File names in UTF-8, in the old DOS code page 437 used by older Windows tools, or with an Info-ZIP Unicode path field.
- Self-extracting archives and other ZIPs with extra data in front.
- Truncated archives: when the directory at the end is missing, the tool recovers entries from the headers in front of each file and says so: “The central directory is missing (the data looks truncated).” Entries whose data was cut off report that they are missing.
Classic ZIP timestamps have no time zone, so Modified shows whatever the clock said on the machine that made the archive. When an entry also carries a Unix timestamp in an extra field, that one is used and shown in your local time.
What can be extracted
| Entry | Listed | View and Save |
|---|---|---|
| Stored (method 0) | Yes | Yes |
| Deflate (method 8) | Yes | Yes |
| Deflate64, BZIP2, LZMA, Zstandard, XZ, PPMd | Yes, with the method in brackets | No: “Compression method BZIP2 is not supported in the browser.” |
| Encrypted, ZipCrypto or AES | Yes, marked [protected] | No: “This entry is password-protected: it can be listed, not extracted.” |
| Folders | Yes | No |
Archives made by Windows, macOS and the zip command use Deflate. The other methods mostly come from 7-Zip or WinZip, when someone chose them for a better ratio.
The zip-bomb guard
Compression can turn a small download into a huge file. 100 MiB of zeros deflates to about 100 KB, and nested or crafted archives push that much further. Before unpacking an entry, the tool checks the size declared in the archive, and refuses anything over 64 MB with “Stopped at 64.0 MB unpacked: too large to unpack in the browser (possible zip bomb). Download the archive instead.” While unpacking, it also stops at the declared size plus 1 KB, so an entry that lies about its size cannot grow past what it claimed.
The summary line still reports the declared total, which is a useful warning on its own: an archive of a few hundred kilobytes that unpacks to gigabytes deserves suspicion before you extract it with any tool.
Is it really a ZIP?
ZIP files begin with PK and two bytes, which is UEsDB in Base64; an empty archive starts UEsFBg. Many formats are ZIP archives under another name, and the tool says which: DOCX, XLSX, PPTX, EPUB, ODT, JAR, APK. They all list and extract here; Office documents also get a text preview on Base64 to Word and Base64 to Excel.
Other archive formats are not ZIP. The tool unpacks gzip, but not 7-Zip or RAR:
| Base64 starts with | Format | What happens |
|---|---|---|
H4sI | gzip (.gz, .tar.gz) | Unpacked and previewed, with Download as .gz |
N3q8ryc | 7-Zip | “This doesn’t look like ZIP (detected: 7-Zip)” |
UmFyIRo | RAR | “This doesn’t look like ZIP (detected: RAR)” |
For the 7-Zip and RAR cases, Extension stays zip. Type 7z or rar there before downloading, otherwise your system will try to open it as a ZIP and fail.
Unpack a Base64 ZIP in Python
zipfile reads straight from the decoded bytes, so nothing has to be written to disk first:
import base64, io, zipfile
with open("archive.b64") as f:
data = base64.b64decode(f.read())
with zipfile.ZipFile(io.BytesIO(data)) as z:
for info in z.infolist():
print(f"{info.filename:20} {info.file_size:>8} method={info.compress_type}")
z.extract("docs/readme.txt", "out")
The method column shows the same numbers as the table above: 0 for stored, 8 for Deflate, 12 for BZIP2, 14 for LZMA. Python extracts all four. From a shell, base64 -d archive.b64 > archive.zip && unzip -l archive.zip lists the contents. To build such a string from files, see ZIP to Base64 and Base64 in Python.
FAQ
How do I convert Base64 to a ZIP file?
Paste the string above and press Download file to save decoded.zip. To get a single file out instead, press Save next to it in the list.
Can I open a password-protected ZIP here?
The entries are listed with a [protected] mark, but they cannot be extracted in the browser. Download the archive and open it with 7-Zip, unzip or your system’s archive tool, which will ask for the password.
Why does an entry say its compression method is not supported?
Browsers can only inflate Deflate, the method almost every ZIP uses. Entries packed with BZIP2, LZMA, Deflate64, Zstandard or PPMd, usually by 7-Zip or WinZip, are listed but have to be extracted with a desktop tool or Python’s zipfile, which reads BZIP2 and LZMA.
My Base64 starts with H4sI. Is that a ZIP?
No, that is gzip. The tool says it looks like GZIP, unpacks it and shows what is inside; a .tar.gz contains a TAR archive. Download as .gz saves it with the right extension.