How to Compress a CSV File (Reduce File Size)
"Compress a CSV" means one of two different things: package the file into a smaller archive without touching the data, or shrink the data itself so tools stop struggling with it. This guide covers both, and when to use which.
Bottom line: To clear an email or upload limit, ZIP the file, plain CSV compresses 70-95% losslessly. To make the data genuinely smaller, drop unused columns and rows, remove duplicates, reduce numeric precision, then compress or convert to Parquet.
Method 1: Lossless Compression (ZIP / GZIP)
The fastest way to make a CSV smaller without changing a single value is to run it through DEFLATE/ZIP or GZIP. CSV is highly compressible because it is repetitive plain text: the same delimiters, the same category strings, similar numbers row after row. A 100 MB export can routinely become a 5-15 MB archive.
- Use it when: you need to email, upload, or store the file and the data must stay exactly as-is.
- Tradeoff: the recipient has to extract the archive before opening the CSV, and the file is the same size again once expanded.
Method 2: Drop What You Do Not Need
Most oversized CSVs carry columns nobody downstream uses and rows outside the range that matters. Removing them is usually the largest single reduction, and unlike compression it makes the file smaller for every tool, not just in transit.
- Keep only the columns your report or import actually reads.
- Filter rows to the date range, region, or segment you work with.
- Split the file if different consumers need different slices (see how to split a CSV file).
Method 3: Remove Duplicate Rows
Exports that union multiple sources or run on overlapping schedules accumulate duplicate rows that inflate size and distort any aggregation. Deduplicate on the columns that define a unique record, exact-match for identical rows, fuzzy matching for near-duplicates with formatting differences. See how to remove duplicate rows from a CSV file.
Method 4: Normalize Oversized Values
- Round floats:
3.1415926535stored as3.14across a million rows adds up. - Shorten timestamps: if you never use the time,
2026-01-15T00:00:00.000Zbecomes2026-01-15. - Trim whitespace and collapse verbose repeated strings into short codes where a lookup exists.
Method 5: Switch to a Columnar Format (Parquet)
For data you keep or analyze repeatedly rather than hand to a colleague, Parquet stores each column together and compresses it independently, often producing a file a fraction of the CSV size that is also faster to query. The tradeoff is that it is a binary format, not something you can open in a text editor. See CSV vs Parquet for when the switch is worth it.
Which Method Should You Use?
- Emailing a file once: ZIP it (Method 1).
- A tool or database keeps timing out: drop columns and rows, then deduplicate (Methods 2-3).
- Recurring export that is always too big: fix it at the source query, then normalize values (Method 4).
- Long-term storage or analytics: convert to Parquet (Method 5).
Checklist Before You Delete the Original
- Row and column counts match what you expect after each reduction step
- The compressed archive extracts cleanly and the CSV inside opens normally
- Spot-checked IDs, dates, and totals against the source file
- The recipient can open the format you sent (ZIP vs Parquet)
Frequently Asked Questions
Does compressing a CSV file lose any data?
Lossless compression (ZIP, GZIP) does not: the original bytes are restored exactly when the archive is extracted. You only lose data if you deliberately drop columns, filter rows, remove duplicates, or reduce numeric precision.
How much smaller does a CSV file get when compressed?
Plain CSV usually compresses 70-95% with ZIP or GZIP because delimiters, repeated category values, and similar text give the algorithm a lot to work with. Files that are mostly high-entropy numbers compress less.
What is the best format to store a large CSV?
For sharing with people who expect a spreadsheet, a ZIP of the CSV is safest. For storage or repeated analysis, Parquet is usually far smaller and faster to query, at the cost of not being human-readable.
How do I email a CSV file that is too large to attach?
Compress it to a ZIP first. A CSV that is over a 25 MB attachment limit will often drop well under it after compression. If it still will not fit, drop unused columns and rows before compressing.
How do I open a compressed CSV file?
Extract the .zip or .gz archive with your operating system’s built-in unzip, then open the CSV inside as normal. A Parquet file needs a tool that reads Parquet, or convert it back to CSV first.
Why is my CSV file so large in the first place?
Common causes: many columns you do not use, full ISO timestamps where a date would do, long floating-point numbers, duplicate rows, and verbose repeated text values that would be better stored as short codes.
Doing This in How To CSV
How To CSV covers each step as a browser-based tool, nothing is uploaded to a server:
- Compress CSV/XLSX for lossless ZIP compression (Method 1)
- Cleaning and column selection for dropping unused fields and trimming values (Methods 2 and 4)
- Fuzzy Dedupe and Logical Dedupe for duplicate removal (Method 3)
- CSV to Parquet for the columnar-format switch (Method 5)
Need a smaller file right now?
Compress a CSV or XLSX losslessly in your browser, no upload, no size cap.
Compress Your CSV FileTurn this into a saved workflow
Create a free account to save the steps from this guide as a reusable workflow and re-run it on any file, from any device.
Follow HowToCSV on Google
Add us as a preferred source on Google Search so our latest CSV guides and tutorials surface more often in your Top stories.