Reducing CSV file size: a practical guide
A CSV is plain text, so it compresses losslessly and usually very well. This tool wraps each CSV in gzip (.csv.gz) or ZIP (.zip); the data inside is byte-for-byte identical when you extract it.
Measured results from real test files
We ran two 50,000-row CSV files through the same compression settings this tool uses (gzip via pako at its default level, ZIP via DEFLATE level 9):
| Test file | Original | gzip (.csv.gz) | ZIP (.zip) |
|---|---|---|---|
| Sales export (order id, date, region, product, quantity, price, status) | 2.35 MB | 531 KB (77% smaller) | 516 KB (78% smaller) |
| Event log (two 32-character hex IDs and a decimal number per row) | 3.99 MB | 808 KB (80% smaller) | 808 KB (80% smaller) |
Why CSV files compress so well
Compression works by replacing repeated sequences with short references. CSV exports repeat a lot: the same column values (country, status, product category), the same date prefixes, the same delimiters and quotes on every line. The more repetition, the smaller the result.
Columns full of unique values — UUIDs, hashes, high-precision random numbers — repeat very little, so a file dominated by them shrinks less. The tool reports the before and after size of every file so you see the real saving rather than an estimate.
gzip or ZIP: which to pick
| gzip (.csv.gz) | ZIP (.zip) | |
|---|---|---|
| Best for | Data pipelines, databases, cloud storage | Emailing and sharing with non-technical people |
| Opens natively on | macOS and Linux; Windows needs 7-Zip or similar | Windows, macOS, Linux, phones |
| Loads directly into | pandas, BigQuery, Snowflake, Redshift, PostgreSQL COPY via zcat | Most tools after extracting |
| Files per archive | One | One per CSV (or all files bundled) |
Getting a CSV under an attachment limit (25 MB and similar)
- Compress with ZIP first — for typical exports this alone is often enough.
- If the compressed file is still too large, use Split CSV to break the data into parts by row count, then compress each part.
- Remove columns the recipient does not need with Reorder Columns before compressing; dropping a wide free-text column can matter more than the compression format.
Very large files (100 MB+)
Everything runs in your browser tab, so the practical ceiling is your device's memory rather than an upload limit. On a laptop, files of a few hundred megabytes generally work; phones run out of memory much sooner.
For repeated analysis of very large datasets, converting to Parquet is usually a better long-term format than a compressed CSV, because it is columnar, compressed and keeps data types.
Opening a compressed CSV
- ZIP: double-click on Windows or macOS, or right-click → Extract.
- gzip in Python: pandas.read_csv('data.csv.gz') reads it without extracting.
- gzip on the command line: gunzip data.csv.gz, or zcat data.csv.gz | head to peek.
- Excel cannot open .csv.gz directly — extract it first, or choose ZIP.
