Gzip CSV Decompressor

Decompress .csv.gz files in the browser. Validates the gzip header and returns plain CSV ready to copy or download.

The file is decoded with pako and never leaves your browser. Files without the gzip magic bytes (0x1f 0x8b) are rejected immediately.

About CSV Decompressor

Restore a gzipped CSV to plain text without installing anything. The decompressor reads the file as bytes, verifies the gzip magic bytes (0x1f 0x8b) defined by RFC 1952, and runs DEFLATE inflation locally with pako. You see the decoded CSV in a textarea, copy it to the clipboard, or download a .csv that matches the original byte for byte.

A .csv.gz file is a CSV that has been wrapped in the gzip container described by RFC 1952. The container holds a small header (magic bytes 0x1f 0x8b, the compression method, a flag byte, and a timestamp), a DEFLATE-compressed payload defined by RFC 1951, and a trailer with a CRC32 and the original uncompressed size. Decompression reverses that pipeline: read the header, feed the payload to an inflater, then verify the CRC matches.

This tool does that work in the browser. When you pick a file, the bytes are read into a Uint8Array. The first two bytes are checked against the gzip magic so a mislabeled .zip or .br file fails fast with a clear message instead of producing garbage. If the header looks right, the payload is run through pako, the JavaScript port of zlib, and the resulting bytes are decoded as UTF-8. You can then read the CSV in the textarea, copy it to your clipboard, or download a .csv whose name is derived from the input by stripping the .gz suffix.

Because the work is local, the tool is safe for confidential data: PII exports, internal analytics, draft pricing tables, anything you would not paste into a remote converter. It also avoids the round trip of installing a CLI for a one-off file.

How to use the CSV Decompressor
  1. 1

    Select a .gz file

    Click Choose file and pick a .csv.gz or .gz file. The file is read locally into a byte array, never uploaded.

  2. 2

    Header check and inflate

    The first two bytes are validated against the gzip magic (0x1f 0x8b). If valid, pako runs DEFLATE inflation to recover the original bytes.

  3. 3

    Copy or download

    The decoded CSV is shown in the output area. Copy it to the clipboard or download a fresh .csv with the .gz suffix stripped.

Common use cases

Open a gzipped data export

Quickly inspect a vendor data feed delivered as report.csv.gz without installing gzip or a spreadsheet plugin.

Spot-check a backup

Verify that a nightly backup of a CSV table is not corrupt by decompressing it and scrolling through the first hundred rows.

Move data to a tool that wants plain CSV

Convert a .csv.gz from a data lake into a plain .csv before importing it into Excel, Numbers, or a Jupyter notebook.

Detect fake gzip files

If a file is labeled .gz but is really plain text or a different container, the magic-byte check fails and tells you immediately.

Frequently asked questions
Where does my file go?

Nowhere. The file is read with FileReader, decompressed in JavaScript using pako, and held only in your browser tab. Close the tab and the data is gone. There is no upload step and no server-side processing.

What does 'missing 0x1f 0x8b magic bytes' mean?

Every valid gzip file starts with the two bytes 0x1f and 0x8b, as required by RFC 1952. If your file does not start with those bytes it is not gzip, regardless of the extension. Common causes: it is actually a zip, a brotli stream, or a renamed plain CSV.

Will the output match the original CSV exactly?

Yes. Gzip is lossless. The bytes you download are identical to the bytes that were compressed, including line endings and any BOM. If the original had CRLF line endings, so will the output.

Can it handle multi-gigabyte archives?

There is no hard limit, but very large files (several GB decompressed) may exhaust browser memory because the entire decoded buffer is held at once. For files over about 500 MB decompressed, gunzip on the command line is more reliable.

Does it handle tar.gz files?

Not directly. A .tar.gz contains a tar archive of multiple files, not a single CSV. This tool decompresses one gzip stream into one CSV. For tarballs, use a tar-aware extractor first, then drop individual .csv files here if they are gzipped separately.

developerconverterdata