How to Open a .csv.gz File Without Extracting It
An export arrives as orders.csv.gz. To see inside, the usual route is to extract it first — and then there is an uncompressed copy of the data sitting on your disk, next to the original, for you to remember to delete.
Where .gz Files Come From
Gzip is the compression data tools reach for by default, because CSV, JSON and XML shrink so well — often to a fifth or a tenth of their size.
| Source | What it hands you |
|---|---|
| Python and pandas | df.to_csv('orders.csv.gz') compresses on the way out, just from the file name. |
| The command line | gzip orders.csv replaces the file with orders.csv.gz. |
| Data warehouses and cloud storage | Exports and unloads are often gzipped, to save space and transfer time. |
| Log pipelines | Event and log files are commonly delivered as .jsonl.gz or .json.gz. |
Doing It in the Browser
OmniSelect FileSQL unpacks gzip with your browser’s own built-in decompressor, inside the tab, and then reads the file inside exactly as it would read it uncompressed. Nothing is extracted to your disk and nothing is uploaded.
- Open the app.
- Drop the
.gzfile onto the File Select panel. Its row shows the name you dropped,orders.csv.gz, with the type of the file inside, CSV, and the table name in the Alias column:O, from the first letter of the file name. - Look at it.
SELECT * FROM O LIMIT 100
The columns are those of the CSV inside:order_id,customer,city,amount. - Query it like any other table.
SELECT city, SUM(amount) AS total FROM O GROUP BY city ORDER BY total DESC
| city | total |
|---|---|
| Denver | 310 |
| Austin | 181.5 |
| Boston | 139 |
Or ask in plain English. total amount by city becomes:
SELECT city, SUM(amount) AS total_amount FROM O GROUP BY city
and how many orders per customer becomes:
SELECT customer, COUNT(*) AS count_orders FROM O GROUP BY customer
Drop a .csv.gz file in and see inside it.
Open the tool →What Can Be Inside
Any format the tool reads, gzipped:
| File | Read as |
|---|---|
.csv.gz, .tsv.gz, .txt.gz | Delimited text, with the delimiter, quote character and header options on its row |
.json.gz, .jsonl.gz, .ndjson.gz | JSON or JSON Lines, nested fields flattened into columns |
.xml.gz | XML, elements and attributes flattened into columns |
.yaml.gz, .yml.gz | YAML, flattened the same way |
.parquet.gz, .avro.gz, .xlsx.gz … | Also accepted, though rarely seen: these formats are compressed already |
The name has to say what is inside. orders.csv.gz works; orders.gz does not, because nothing tells the tool it holds a CSV. Some exports name their parts like export_0000_part_00.gz — rename such a file to end in .csv.gz (or whatever it holds) and it opens.
Limits
50 MB, counted after unpacking. A 6 MB .csv.gz can hold 50 MB of CSV, and the limit is about what your browser has to hold in memory, so it applies to the unpacked data. The size is checked while the file unpacks: a small file that would expand to gigabytes is stopped at the limit, in well under a second, rather than filling your memory.
One gzip stream per file. Some tools write a .gz file as several compressed parts one after another — bgzip, used for genomics data, and files made by joining .gz files together. Those are refused with a message rather than read partly. To turn one into an ordinary gzip file:
gzip -dc input.gz | gzip > orders.csv.gz
.gz is refused too. Gzip records the unpacked size at the end of every file, and the tool checks it, so a download that stopped early cannot turn into a table with rows quietly missing.Not the Same as .zip
.zip and .gz look alike but are different things. A .zip is an archive: a folder of any number of files, packed into one. A .gz is a single file, compressed. The tool reads .gz; it does not open .zip archives. Windows and macOS both open a .zip with a double-click — take out the file you need and add that.
The same goes for .tar.gz (an archive inside gzip), and for other compression formats — .bz2, .xz, .zst — which browsers have no built-in way to unpack.
Still Private
The decompressor is part of your browser, and it runs inside the tab like everything else here. Unpacking a file makes no network request, so the check in How to verify nothing is uploaded works exactly the same for a .gz file: clear the Network tab, drop the file in, run a query, and the list stays empty.
Reasonable Questions
Does it change my .gz file?
No. The browser gives the page a read-only copy of the file you chose. The original stays exactly as it was, and no uncompressed copy is written anywhere.
Can I join a .csv.gz to other files?
Yes. Once added it is a table like any other, so it joins to a plain CSV, an Excel sheet or another .gz file in the same SELECT — see querying 26 files at once.
Can I export the result as .gz?
No. Exports are CSV, JSON, Excel or Parquet. If you need a small file, Parquet is compressed already.
Is it slower than an uncompressed file?
Unpacking happens once, when you add the file, and takes a fraction of a second at these sizes. After that, queries run exactly as fast as on the uncompressed file.