How Much Does Gzip Shrink CSV, JSON, Parquet and Excel?

Gzip is the most common way to shrink a file. But it helps some formats a lot and others almost not at all.

How we tested. We used one table with 100,000 rows and 7 columns and saved it in four formats. We then compressed each file with gzip, using the standard setting, and compared the sizes. The numbers are from one test file with typical order data, so your results will vary with your data.

The results. The CSV went from 6.87 MB to 1.41 MB, 79 percent smaller. Compact JSON went from 14.76 MB to 1.63 MB, 89 percent smaller, and pretty-printed JSON from 19.56 MB to 1.78 MB. The Parquet file went from 1.84 MB to 1.35 MB, 26 percent smaller. The Excel file went from 4.41 MB to 4.20 MB, only 5 percent smaller.

Why the difference. Gzip finds repeated text and replaces it with short references. CSV and JSON repeat a lot, such as column names and city names, so they shrink a great deal. Parquet and Excel files are already compressed inside, so there is little left to remove. That is why compressing an .xlsx file hardly helps.

What to do. Compress CSV, JSON, XML and YAML before you send or store them. Do not bother compressing Excel files, and expect only a small gain from Parquet. The File Compressor in Data Utility shrinks files and opens .gz files in your browser, with nothing uploaded.

Open the File Compressor

Related tool pages

  • Gzip Compress Files Online: Compress any file with gzip online and make it up to 80 percent smaller. Works for CSV, JSON, XML, YAML and Parquet. Free, in your browser.
  • Open .gz Files Online (Gunzip): Open and decompress .gz files online without extra software, and get your original CSV, JSON or text file back. Free, in your browser.

How to use the File Compressor: step by step

  1. Open the File Compressor.
  2. Drop in one or more files.
  3. Download the .gz files.
  4. Compare the sizes with the originals.

When to use the File Compressor

  • Shrink an export before emailing it
  • Cut storage for log or data files
  • Decide which formats are worth compressing
  • Open a .gz file you received

Example

Input: orders.csv (12.4 MB)

Output: orders.csv.gz (2.1 MB, 83% smaller)

Frequently asked questions

What is gzip?

A common compression format. Most tools, databases and programming languages can read .gz files.

How do I open a .gz file?

Use the Decompress tab here, or double-click it on Mac and Linux, or use 7-Zip on Windows.

What does the File Compressor do?

It shrinks files with gzip (.gz) in your browser and opens .gz files. Text formats such as CSV, JSON, XML and YAML often shrink by 70 to 90 percent. Parquet is already compressed, so it shrinks only a little.

Tip: Name the file with its original extension plus .gz, for example sales.csv.gz, so everyone knows what is inside.