Can ChatGPT Unzip Files? Limits, Sandbox Execution, and Workarounds
ChatGPT can unzip and read files from ZIP archives using its built-in Python Code Interpreter environment. While OpenAI permits archive uploads up to 512MB per file, container execution memory budgets, disk space limits, and 10-minute session timeouts create severe operational bottlenecks. For multi-file collections and persistent agent workflows, external cloud workspaces provide durable, indexed retrieval without ephemeral sandbox loss.
How ChatGPT Unzips Archives Using Python Code Interpreter
OpenAI documents a maximum file upload limit of 512MB per file across ChatGPT chats and custom GPTs (verified in official OpenAI file upload documentation, checked November 2026). When you upload a ZIP archive under this threshold, ChatGPT does not unpack the archive through a native document parser; it delegates extraction to an isolated Python sandbox running Code Interpreter.
When you attach an archive to the chat prompt, the file is saved directly into the temporary environment filesystem, typically under /mnt/data/. ChatGPT then writes and executes a Python script using the standard zipfile module to inspect the contents.
import zipfile
import os
zip_path = "/mnt/data/archive.zip"
extract_dir = "/mnt/data/extracted_archive"
with zipfile.ZipFile(zip_path, "r") as archive:
archive.extractall(extract_dir)
extracted_files = []
for root, dirs, files in os.walk(extract_dir):
for name in files:
extracted_files.append(os.path.relpath(os.path.join(root, name), extract_dir))
print(f"Extracted {len(extracted_files)} files.")
Once extracted, ChatGPT can read individual text files, parse tabular data from CSV or Excel spreadsheets using pandas, and run scripts to summarize document collections. The interface itself does not provide an interactive folder tree or file explorer. You interact with the extracted files exclusively through the conversational prompt, asking ChatGPT to inspect specific filenames, search for patterns, or generate processed download links.
Related guides
- ChatGPT File Limit: How Many Files You Can Upload and Storage CapsChatGPT restricts file uploads to 10 files per message turn, 512MB per document or audio file, and 2 million tokens per...
- AutoGen File Limits: Code Execution Sandbox Caps and External Workspace IndexingAn AutoGen file limit is the restriction on file size, upload volume, or sandbox disk capacity that AutoGen agents face...
- ChatGPT Code Interpreter File Size Limit: Upload Caps and Sandbox WorkaroundsWhile ChatGPT Code Interpreter permits raw file uploads up to 512MB per file, the sandboxed Python execution container...
- ChatGPT CSV Upload Limit: File Size Caps, Row Limits, and Memory WorkaroundsThe ChatGPT CSV upload limit allows raw files up to 512MB, but the Python sandbox frequently crashes on dataframes...
- ChatGPT File Upload Failed: Causes, Limits, and Workspace WorkaroundsA ChatGPT file upload failed error occurs when an attached file exceeds OpenAI size limits (typically 512MB per file or...
- ChatGPT File Upload Limits: How to Handle Large Files and FoldersChatGPT limits documents to 512MB per file, uploads to 80 files every 3 hours, and upload storage to 25 GB per user,...
More on this subject: Agent File and Document Workflows (397 guides)
ChatGPT ZIP File Limits and Sandbox Constraints
While ChatGPT can open ZIP files, running file extraction inside a sandboxed Python runtime introduces strict architectural boundaries. The headline upload limit of 512MB per file is only the first constraint. The real operational limits stem from the sandbox container environment.
Anthropic documents that Claude chat accepts up to 20 files at up to 500MB each, while Claude Projects accepts files up to 30MB each with no fixed file-count cap, provided the total content fits within Claude's context window (verified in Claude upload documentation). In comparison, ChatGPT processes files through its execution container, which introduces distinct runtime boundaries.
Working with archives inside ChatGPT requires managing five primary constraints:
- Upload Size Ceilings: The initial archive upload cannot exceed
512MBper file. Attempting to upload an archive larger than512MBtriggers an immediate rejection in the browser interface. - Container Memory Budgets: The execution sandbox runs with limited system memory, typically allocated between
512MBand1GBof RAM. If an archive expands into a large memory footprint or if a script attempts to read multiple large CSV files simultaneously, the Python kernel crashes with aMemoryError. - Scratch Disk Space Ceilings: The container provides a finite temporary disk volume on
/mnt/data/. Highly compressed archives that contain gigabytes of uncompressed text or log files can fill the available disk volume, producingOSError: Errno 28 No space left on device. - Ephemeral Session Resets: The Code Interpreter container is temporary. Container execution environments reset after
10to20minutes of inactivity, discarding extracted files. Once the container spins down, all extracted folders in/mnt/data/are purged. In subsequent prompt turns, ChatGPT cannot read the extracted files without executing the extraction script again. - Context Window Limitations: ChatGPT does not automatically place the entire extracted archive into the prompt context. Any file content ChatGPT analyzes must either be processed inside Python or passed back into the active context window. Feeding dozens of text files into the conversation rapidly exhausts context tokens, leading to truncation or lost detail.
Why ChatGPT Fails to Read Certain ZIP Files
Users frequently encounter errors where ChatGPT reports that it cannot open or read an uploaded archive. Because ChatGPT relies on Python code execution rather than an automated archive parser, several specific conditions cause extraction to fail:
- Password Protection and Encryption: The standard Python
zipfilemodule supports legacy ZipCrypto decryption but does not support modern AES encryption without external third-party libraries likepyzipper. If you upload an encrypted ZIP file, extraction raisesRuntimeError: Bad password for fileorNotImplementedError: That compression method is not supported. Providing passwords in plain text chat prompts also creates clear security risks. - Corrupted File Headers and Split Archives: Multi-volume archives (
.z01,.part1.rar) fail because ChatGPT treats each upload as a standalone file. If header bytes are damaged during transfer, Python cannot read the central directory records. - Unsupported Compression Formats: Renaming a
.7z,.rar, or.tar.gzfile to.zipwill cause thezipfile.is_zipfile()check to fail withBadZipFile: File is not a zip file. - Execution Timeouts: Code Interpreter enforces execution timeouts (typically
60seconds per code block). Archives containing tens of thousands of tiny files cause file system traversal loops to time out before extraction completes. - Binary and Proprietary Payloads: ChatGPT can extract binary files, compiled executables, and proprietary database formats, but it cannot interpret their internal structures without specialized Python parsing libraries installed in the container environment.
To diagnose archive issues safely, prompt ChatGPT to inspect the archive header and report uncompressed sizes before attempting a full extraction:
import zipfile
zip_path = "/mnt/data/archive.zip"
with zipfile.ZipFile(zip_path, "r") as z:
file_list = z.infolist()
total_uncompressed_bytes = sum(f.file_size for f in file_list)
print(f"Total entries: {len(file_list)}")
print(f"Uncompressed volume: {total_uncompressed_bytes / (1024 * 1024):.2f} MB")
encrypted = [f.filename for f in file_list if f.flag_bits & 0x1]
if encrypted:
print(f"Warning: {len(encrypted)} files are encrypted.")
Query Complex File Collections Without Sandbox Limits
Store multi-gigabyte document trees in persistent Fast.io workspaces with automated semantic indexing, per-file version history, and remote MCP connectivity for ChatGPT and Claude. Monthly plans start with a 14-day free trial, credit card required.
Step-by-Step Methods for Unzipping Files in ChatGPT
To extract and read archives in ChatGPT reliably, follow structured procedures that avoid exhausting container memory.
Method 1: Direct Upload with Targeted Extraction Prompts
When uploading an archive containing small documents or code files, provide explicit execution instructions in your initial prompt. This prevents ChatGPT from attempting to dump the entire archive contents into chat output.
Use a prompt formatted like this:
"I have uploaded an archive named data.zip. Please unzip the file into a dedicated folder, print the top-level directory structure, and list the filenames and sizes of the contents. Do not output the file text into the chat. Wait for my next instruction before reading specific files."
This instruction allows the Python script to unpack the files cleanly, verify directory contents, and leave the data on disk for subsequent queries.
Method 2: Selective Stream Extraction Without Full Unpacking
If an archive approaches container disk or memory limits, extracting every file simultaneously risks crashing the environment. Prompt ChatGPT to inspect individual files directly from the archive stream without unpacking the rest of the collection to disk:
import zipfile
import json
zip_path = "/mnt/data/archive.zip"
target_file = "reports/summary.json"
with zipfile.ZipFile(zip_path, "r") as z:
if target_file in z.namelist():
with z.open(target_file) as f:
data = json.load(f)
print("Extracted target file without full archive unpacking.")
print(f"Keys found: {list(data.keys())}")
Streaming individual files directly allows you to inspect specific documents while keeping the scratch disk completely clear.
Method 3: Pre-Filtering Archives Locally Before Upload
When working with dense repositories, local filtering produces the cleanest results:
- Strip Dependency Directories: Remove local build artifacts,
node_modules,.gitfolders, virtual environments, and temporary log directories before creating the archive. - Group by File Type: Separate binary media assets from plain text, markdown, and CSV files. Upload only the text and data assets that ChatGPT needs to analyze.
- Split Large Datasets: If uncompressed data exceeds
1GB, divide the files into smaller logical archives organized by date or subject.
Persistent Alternatives for Large Multi-File Archives
Extracting archives inside an ephemeral chat session is a temporary workaround. For ongoing projects, engineering research, and team collaboration, unpacking multi-file collections into a stateless container creates recurring operational friction. Every time the sandbox resets, files must be uploaded and uncompressed again, and team members cannot view or search the extracted files together.
Teams managing multi-file collections generally evaluate three approaches:
- Local Extraction with Manual Chat Uploads: Extracting archives on a local machine and uploading individual documents works for small batches, but quickly encounters upload volume limits. ChatGPT restricts messages to
10files per prompt turn,80files per3hours on paid tiers, and3files per day on free accounts. - Object Storage Repositories: Uploading archives to raw cloud buckets (such as Amazon S3 or Google Cloud Storage) provides persistent storage, but requires building custom retrieval pipelines, chunking scripts, and vector databases before an LLM can query the content.
- Intelligent Workspaces on Fast.io: Fast.io provides a persistent workspace where archives are stored directly in their natural uncompressed folder structure. Fast.io workspaces eliminate archive upload caps by storing and indexing multi-gigabyte extracted folder trees directly for MCP access. Upload allowances scale up to
25 GBon Starter,50 GBon Business, and100 GBon Enterprise.
With Intelligence Mode enabled on a workspace, all uploaded files are automatically indexed for hybrid full-text and semantic search. AI assistants connect directly to the workspace through the Model Context Protocol (MCP):
- ChatGPT Integration: Fast.io is listed in the ChatGPT plugin directory. To connect, open
chatgpt.com/plugins, install the Fastio plugin, and sign in when prompted. You can then query your workspace documents by mentioning@Fastioin any chat. For developer workspaces or Codex, you can alternatively connect to a custom MCP server athttps://mcp.fast.io/mcp/operations. - Claude Integration: In Claude web or desktop, add a custom connector pointing to
https://mcp.fast.io/mcp/toolsusing Streamable HTTP. - Coding Agents: Developer environments (including Claude Code, Cursor, Cline, and VS Code) connect to
https://mcp.fast.io/mcp/codeusing Streamable HTTP. Detailed configuration instructions are available on Fast.io MCP documentation.
Teams exploring agent infrastructure can review Fast.io storage for agents and explore how Fast.io intelligent workspaces persist context across multi-agent workflows.
Instead of uploading a 500MB ZIP file and hoping the Python container does not reset, your assistant searches indexed workspace files dynamically, retrieving only the specific passages needed to answer your prompt. For structured records like invoices, contracts, and research forms, Metadata Views automatically extracts typed fields (Text, Integer, Decimal, Boolean, URL, JSON, Date & Time) across your files into filterable spreadsheets without manual OCR templates.
Workspaces also maintain Collaborative Notes kept beside files for humans and agents with version-checked saves, per-file version history, and a detailed activity log of file changes. Cloud Sync connects Google Drive, Dropbox, Box and OneDrive folders to a workspace, one-way or two-way, on a schedule or on demand.
Monthly plans start with a 14-day free trial, which requires a credit card. Subscriptions are Starter at $9.99/mo (3 seats, 250 GB storage, 5 workspaces, 100,000 credits a month), Business at $49.99/mo (10 seats, 5 TB storage, 50 workspaces, 600,000 credits a month), and Enterprise at $199.99/mo (30 seats included, more at $1 a seat up to 200, 25 TB storage, 200 workspaces, 3,000,000 credits a month) on the Fast.io pricing page. Annual plan pricing is $99, $499, and $1,999 a year. Credits meter AI work only; overage is $10 per 100,000 credits.
Sources
References used to verify factual claims in this guide.
-
OpenAI enforces a maximum file size limit of 512MB per file for documents and presentations uploaded to ChatGPT.
-
Anthropic limits Claude chat uploads to 20 files at up to 500MB each and Project files to 30MB, bounded by total context window capacity.
Frequently Asked Questions
Can I upload a ZIP file to ChatGPT?
Yes, you can upload ZIP files directly to ChatGPT in conversations where Code Interpreter is enabled. ChatGPT uploads the archive to a sandboxed Linux container and uses Python's standard zipfile library to unpack and inspect the files.
How does ChatGPT extract ZIP files?
ChatGPT saves the uploaded archive to temporary storage in its execution environment (under /mnt/data/) and runs automated Python scripts using the zipfile or shutil modules. The script extracts the files to a temporary directory where ChatGPT can inspect file lists, read text, or parse tabular data.
What is the maximum ZIP file size ChatGPT can handle?
ChatGPT enforces a single-file upload limit of `512MB` for archives and documents. Even if an archive is smaller than `512MB`, the uncompressed content must fit within the container scratch disk and system memory (typically `512MB` to `1GB` of RAM).
Why can't ChatGPT read my ZIP file?
ChatGPT fails to read ZIP files if the archive is encrypted with modern AES password protection, contains corrupted headers, exceeds the `512MB` upload ceiling, or contains unsupported compression formats like RAR or 7z renamed to ZIP. Extraction also fails if uncompressed files exhaust sandbox memory or disk space.
How long do unzipped files stay accessible in ChatGPT?
Extracted files remain available only for the duration of the active Code Interpreter session. Container execution environments reset after `10` to `20` minutes of idle time. Once reset, all unzipped files on the scratch disk are deleted, requiring re-extraction.
Can ChatGPT unzip password-protected ZIP archives?
Standard ChatGPT Code Interpreter execution cannot open modern AES-encrypted ZIP archives because the default Python zipfile module does not support AES decryption. Providing passwords in conversational prompts also poses security risks.
How do cloud workspaces differ from unzipping files in ChatGPT?
Unzipping in ChatGPT is temporary and bound to an ephemeral container that resets after inactivity. Cloud workspaces like Fast.io store uncompressed files permanently in their full folder hierarchy, automatically index documents for hybrid semantic and full-text search, and allow AI assistants to query files via MCP without reloading entire archives into prompt memory.
Related Resources
Query Complex File Collections Without Sandbox Limits
Store multi-gigabyte document trees in persistent Fast.io workspaces with automated semantic indexing, per-file version history, and remote MCP connectivity for ChatGPT and Claude. Monthly plans start with a 14-day free trial, credit card required.