ToolsBlog

How to Open a .csv.gz File

Try it free:Gzip CSV ReaderCSV DecompressorCSV Compressor

Table of Contents

  • What a .csv.gz file is (and is not)
  • Option 1: view it in your browser without decompressing
  • Option 2: decompress it in your browser
  • Option 3: decompress it on your computer
  • Option 4: read it directly with Python or DuckDB
  • When a .csv.gz file will not open
  • How to make a .csv.gz file
  • FAQ
  • Can Excel open a .csv.gz file?
  • How do I open a .csv.gz file without unzipping it?
  • Is .gz the same as .zip?
  • Are .csv.gz files safe to open?
  • How big can the file be?

A file named data.csv.gz is an ordinary CSV file that has been compressed with gzip. Data portals, cloud exports and log pipelines use it because text compresses well: a CSV often shrinks to a fraction of its size, which makes it faster to download and cheaper to store.

The catch is that Excel, Google Sheets and Numbers cannot read the compressed file. You either decompress it first or use a tool that reads gzip directly. This guide covers both.

What a .csv.gz file is (and is not) #

gzip compresses one file. Inside data.csv.gz there is exactly one data.csv, nothing else. That makes it different from:

  • .zip, which can hold many files and folders.
  • .tar.gz or .tgz, which is a folder of files bundled with tar and then gzipped. Extract it with tar -xzf archive.tar.gz.

If you only want to look at the data, you do not need to decompress the file to disk at all.

Option 1: view it in your browser without decompressing #

The Gzip CSV Reader opens a .csv.gz file directly in the browser tab. It decompresses the file as a stream on your device, so nothing is uploaded and nothing extra is written to your disk.

  1. Open the Gzip CSV Reader and choose your .csv.gz file.
  2. The first 50,000 rows appear in a table.
  3. Below the table, the reader shows the total row count. It reads the whole file to count every row, even when that is millions.

Because the file is streamed, multi-gigabyte files work without filling your computer's memory. It also accepts .zip files that contain a CSV.

The reader checks the file's first bytes rather than trusting the name. If your "gzip" file is really a bzip2, XZ, 7-Zip, Zstandard or RAR archive, it tells you, since browsers cannot extract those formats.

Option 2: decompress it in your browser #

When you need the full CSV, for Excel or another program, use the CSV Decompressor. It turns data.csv.gz back into data.csv, again without uploading anything:

  1. Open the CSV Decompressor and choose the file.
  2. Click Decompress.
  3. Save the resulting .csv.

Decompression is streamed, so memory use stays flat. In Chrome and Edge the result is written straight to a file you choose, with no fixed size limit. Firefox and Safari hold the result in the browser's storage on disk, which allows results up to about 10 GB.

Option 3: decompress it on your computer #

macOS. Double-click the file. Archive Utility extracts data.csv into the same folder.

Windows. Install 7-Zip (free), right-click the file and choose 7-Zip > Extract Here. 7-Zip opens .gz on every Windows version.

macOS and Linux terminal. Use gunzip. The -k flag keeps the original .gz file:

gunzip -k data.csv.gz      # writes data.csv next to it

To peek at the first lines without writing anything to disk:

gzip -dc data.csv.gz | head -n 5

On Linux, zcat data.csv.gz does the same. On macOS, the built-in zcat looks for .Z files instead, so use gzcat or gzip -dc.

Once you have data.csv, Excel, Google Sheets and Numbers open it normally. Remember Excel's limit of 1,048,576 rows per sheet: if the CSV is bigger, Excel loads only the first rows. Split the large CSV into smaller files first.

Option 4: read it directly with Python or DuckDB #

Most data tools read gzip without a separate step.

pandas detects the compression from the .gz extension:

import pandas as pd

df = pd.read_csv("data.csv.gz")
print(df.head())

DuckDB queries the compressed file with SQL, no decompression needed:

SELECT count(*) FROM 'data.csv.gz';
SELECT * FROM 'data.csv.gz' LIMIT 10;

-- Save a filtered slice as a regular CSV
COPY (SELECT * FROM 'data.csv.gz' WHERE id <= 1000) TO 'slice.csv';

This is the best route when the file is too large for a spreadsheet and you only need part of it.

When a .csv.gz file will not open #

  • "Not in gzip format". The file may already be decompressed. Some web servers send files gzip-encoded, the browser decompresses them while downloading and keeps the .gz name. Open it in a text editor: if you can read the rows, rename it to .csv. The Gzip CSV Reader detects this and shows the CSV anyway.
  • "Unexpected end of file". The download was cut off. gzip stores a checksum at the end of the file, so a truncated file cannot be fully read. Download it again.
  • The wrong size is reported. gzip -l prints the uncompressed size, but the gzip format only stores it modulo 4 GB, so the number is wrong for larger files. Decompress or stream the file to know the real size.
  • Garbled characters. The CSV inside may not be UTF-8. Decompress it first, then open it with the right encoding.

How to make a .csv.gz file #

Going the other way is just as easy: gzip -k data.csv on the command line, or the browser-based CSV Compressor. Our guide on how to make CSV files smaller explains when gzip is the right choice and when Parquet is better.

FAQ #

Can Excel open a .csv.gz file? #

Not directly. Decompress it first with the CSV Decompressor, 7-Zip, Archive Utility or gunzip, then open the .csv in Excel.

How do I open a .csv.gz file without unzipping it? #

Use the Gzip CSV Reader in your browser, gzip -dc data.csv.gz | head in a terminal, or read it directly with pandas or DuckDB.

Is .gz the same as .zip? #

No. Both use the DEFLATE compression method, but a .zip is an archive that can hold many files, while a .gz compresses a single file. Most unzip tools, including 7-Zip, open both.

Are .csv.gz files safe to open? #

The compression itself is harmless, and a CSV is plain text. Viewing it in a browser-based reader or a text editor does not run anything. Be careful opening CSVs from unknown sources in a spreadsheet, as cells starting with = are treated as formulas.

How big can the file be? #

The Gzip CSV Reader has no fixed limit because it streams the file and shows the first 50,000 rows. For the full file, the CSV Decompressor handles multi-gigabyte results.

Try the tools from this post

Free and private: your files stay in your browser.

  • Gzip CSV ReaderRead your compressed CSV files online.
  • CSV DecompressorDecompress your gzipped CSV files in a breeze.
  • CSV CompressorSave space and improve performance with our CSV Compressor.

Related posts

How to Split a Large CSV File into Multiple Files

Split a big CSV into smaller files by row count or size, with the header in every part. Four tested methods: in your browser, with the split command, DuckDB or pandas.

2026-11-18

How to Make CSV Files Smaller with GZIP Compression

Learn how to compress CSV files to make them smaller and more efficient.

2024-10-09

Why CSV is King

Why CSV is King: Areas where it excels

2024-08-25

ChatDB

Free, browser-side data tools. No uploads, no accounts.

Data tools

Reader

  • Online CSV Viewer
  • Parquet Viewer & Reader
  • Excel Viewer and Editor
  • SQLite Viewer
  • Gzip CSV Reader
  • CSV Size Analyzer
  • Parquet Schema Reader
  • Parquet Metadata Reader
  • Data Profiler
  • Image Measure
  • Shapefile Viewer
  • GeoJSON Viewer

Editor

  • CSV Viewer and Editor
  • Excel Viewer and Editor
  • Online Excel Editor
  • CSV Splitter
  • Markdown Editor
  • Image Cropper
  • SVG Editor
  • Screenshot Background Creator
  • Document Scanner
  • Audio Clipper
  • Video Trim & Crop Tool

Converter

  • CSV to Gzip Converter
  • CSV to Parquet Converter
  • Excel to CSV Converter
  • Parquet to CSV Converter
  • JSON to Parquet Converter
  • Parquet to JSON Converter
  • CSV Decompressor
  • CSV to JSON Converter
  • CSV to Markdown Table
  • Image Converter
  • KML to GeoJSON Converter
  • GPX to GeoJSON Converter
  • GeoJSON to KML Converter
  • Shapefile to GeoJSON Converter

Formatter

  • CSV Encoder
  • SQL Formatter
  • JSON Formatter
  • XML Formatter
  • YAML Formatter
  • Dataset README Generator
  • URL Encoder & Decoder
  • Regex Tester

Compressor

  • CSV Compressor
  • CSV to Gzip Converter
  • CSV Decompressor
  • Image Compressor

AI

  • Parquet AI
  • CSV AI
  • Color Palette Generator
  • Extract Image Colors

GIS

  • Lat/Lng Point Finder
  • KML to GeoJSON Converter
  • GPX to GeoJSON Converter
  • GeoJSON to KML Converter
  • Shapefile to GeoJSON Converter
  • Shapefile Viewer
  • GeoJSON Viewer

Image tools

Convert To

  • Convert to JPEG
  • Convert to PNG
  • Convert to WEBP
  • Convert to GIF
  • Convert to BMP
  • Convert to TIFF
  • Convert to ICO
  • Convert to AVIF
  • Convert to FF
  • Convert to HDR
  • Convert to EXR
  • Convert to QOI
  • Convert to TGA
  • Convert to PNM

Edit

  • Image Cropper
  • SVG Editor
  • Screenshot Background Creator
  • Document Scanner

Compress

  • Compress JPG
  • Compress JPEG
  • Compress PNG
  • Compress WEBP
  • Compress GIF

Company

  • All tools
  • Blog
  • Privacy Policy
  • Terms of Service

© 2026 ChatDB. All rights reserved.

v2.4.1