.GZ

GZ File

Gzip Compressed File
Ask a question
QUICK ANSWER

A GZ file is a single file compressed with gzip, the standard Unix/Linux compressor. On Windows, open it with the free 7-Zip or PeaZip. On macOS, double-click it - Archive Utility handles it automatically. On Linux, run gunzip file.gz or tar -xzf file.tar.gz. The key thing to know: plain .gz holds only one file, so most downloads arrive as .tar.gz (many files bundled first, then compressed).

Developer: The GNU Project (gzip by Jean-loup Gailly and Mark Adler) Category: Compressed Files Open standard MIME: application/gzip
OPENS ON Windows macOS Linux Android
Related: .RAR · .ZIP · .Z01 · .7Z

On this page

19k+ extensions indexed
Last reviewed Aug 5, 2026

Not sure what your file is?

Drop any file into our identifier - we read just the first bytes to name the format.

Identify a file

What is the GZ file format?

A .gz file is a compressed file produced by the GNU zip (gzip) tool. The format was developed by Jean-loup Gailly and Mark Adler for the GNU Project, with the goal of creating a patent-free replacement for the older .Z compression used on UNIX systems. .gz files store useful metadata in their header - the original file name and a modification timestamp - which can be helpful if the file gets renamed during the compression process.

Where is .gz compression used?

Files in the .gz format are commonly encountered in software packages and installers for Unix-based operating systems. Besides installers, the .gz format is also frequently used to compress text resources such as HTML, CSS and JavaScript on web servers, which facilitates faster loading of web pages. Nonetheless, this compression method is also used for regular data archiving, so .gz files can be encountered by Windows and macOS users as well.

Details about .gz compression

The .gz compression method has one important characteristic: an archive may contain only a single file. The standard way to work around this limitation is to first bundle multiple files using the tar archiving tool, then compress the result - producing a .tar.gz or .tgz file. This two-step approach is the de-facto standard for distributing software source code on Linux and macOS.

Security & safety

RISK: LOW

The gzip format is open and safe, and a .gz is just compressed data that can't run on its own. The usual archive caution applies: a .gz/.tar.gz from an untrusted source can contain executables or scripts that are revealed only after extraction, so scan the contents before running anything. Two technical notes: extremely small .gz files can expand to enormous sizes ('decompression bombs') - be wary of suspiciously tiny archives; and a .tar.gz can contain paths with '../' (a path-traversal/'tar slip' risk) - modern extractors guard against this, but extract untrusted tarballs into an empty folder.

Format details

in a nutshell
FULL NAMEGzip Compressed File
DEVELOPERThe GNU Project (gzip by Jean-loup Gailly and Mark Adler)since 1992 (gzip 1.0); format standardized as RFC 1952 (1996)
MIME TYPEapplication/gzip
TYPESingle-stream compressed file (DEFLATE), RFC 1952
STANDARDOpen · royalty-free
MAGIC BYTES · FILE SIGNATURE
OFFSET
000102
HEX
1F8B08
ASCII
···
Fixed signature 1F 8B at offset 0, followed by the compression method byte (08 = DEFLATE, the only one in practice). Byte 3 is flags; the original filename may be stored when the FNAME flag is set. The original file's size (mod 2^32) is in the last 4 bytes (ISIZE).

Programs that open GZ files

Windows3 apps
WinRAR Paid Double-click to open and Extract; extracts .gz and .tar.gz in one pass. (7-Zip/PeaZip are the free choices.)
7-Zip Open-source Right-click the .gz > 7-Zip > Extract Here. For .tar.gz, extract twice (once to .tar, once to the files) - or use 'Extract Here' again. Free; also creates .gz.
PeaZip Open-source Open the .gz/.tar.gz and Extract; handles the tar layer automatically in one step.
macOS3 apps
The Unarchiver Free Set as default for .gz/.tar.gz and double-click to extract. Free on the Mac App Store.
Archive Utility (built-in) Built-in Double-click the .gz or .tar.gz in Finder - macOS decompresses (and untars) it automatically. No install needed.
Keka Free Drag the .gz onto Keka to extract; Keka also CREATES .gz and .tar.gz with options.
Linux2 apps
gzip / gunzip / tar (CLI) Open-source Single file: gunzip file.gz. Tarball: tar -xzf file.tar.gz. Pre-installed on essentially every Linux/Unix system.
Ark / File Roller / Xarchiver Open-source Default KDE/GNOME archive managers: open the .gz/.tar.gz and Extract from the GUI.
Android1 app
ZArchiver Free Tap the .gz/.tar.gz and Extract; handles the tar layer too. Also creates .gz.

Technical details

deep spec
Magic bytes`1F 8B` at offset 0, followed by `08` (DEFLATE method byte)
Compression algorithmDEFLATE (RFC 1951); method byte `08` is the only value used in practice
MIME type`application/gzip`
Files per streamOne - `.gz` compresses a single input file per stream
Header metadataStores the original filename (FNAME flag) and last-modified timestamp of the source file
Integrity checkCRC-32 checksum of the uncompressed data, written to the 8-byte trailer and verified on extraction
Size field4-byte ISIZE in the trailer holds the original uncompressed size modulo 2³²
Compression levelsNine levels (1 = fastest/least compression, 9 = slowest/best); default is level 6
HTTP content encodingUsed as the `gzip` Content-Encoding in HTTP/1.1 for compressing web responses on the fly
Stream concatenationMultiple `.gz` streams can be concatenated; `gunzip` decompresses them as a single continuous output
OS identification1-byte OS field in the header (e.g., `03` = Unix, `00` = FAT) identifies the originating system
Header flagsFlags byte controls optional fields: FNAME, FCOMMENT, FEXTRA, and FHCRC (header CRC-16 check)
EncryptionNone built in - the format has no password protection or encryption mechanism
Multi-file conventionUse `tar` first to bundle files, then compress: `tar czf archive.tar.gz files/` produces a `.tar.gz` tarball
Streaming designCompresses in a single forward pass; does not require knowing the total input size before starting
Released1992 (gzip 1.0); format standardized as RFC 1952 (1996)
Open standardYes · royalty-free
Specificationwww.rfc-editor.org

GZ conversions

Community Q&A

asked by users
Ask a quick question
Get help from people who work with GZ files. Be specific - include your system and software version.
No account needed · answers usually within a day

No questions yet - be the first to ask about GZ files.

Frequently asked questions

How do I open a GZ file?
On Windows use 7-Zip or PeaZip (right-click > Extract). On macOS just double-click it (Archive Utility handles it) or use Keka. On Linux run gunzip file.gz, or tar -xzf file.tar.gz for a tarball.
What's the difference between .gz and .tar.gz?
A plain .gz compresses a SINGLE file. A .tar.gz (or .tgz) is many files first bundled into one .tar archive, then gzipped - that's why most Linux/source downloads are .tar.gz.
How do I open a GZ file on Windows?
Windows Explorer doesn't open .gz natively, so install the free 7-Zip or PeaZip. Right-click the file > 7-Zip > Extract Here. For .tar.gz you may extract twice (gz then tar).
Can I create a GZ file for free?
Yes - gzip is open, so 7-Zip, PeaZip and Keka all create .gz/.tar.gz for free, and Linux/macOS have gzip/tar built in.
Why is my GZ file only one file when I expected many?
Because gzip compresses just one stream. Multiple files are packaged as .tar.gz: the .tar holds all the files and the .gz compresses it. Extract the gz to get the .tar, then extract the .tar.
How do I extract a .tar.gz in one step?
On Linux/macOS: tar -xzf archive.tar.gz. In a GUI, PeaZip, Keka, Ark and File Roller all unwrap both the gzip and tar layers in a single extract.

References

1RFC 1952 - GZIP file format specificationwww.rfc-editor.org
2GNU gzip - official site/manualwww.gnu.org

Keep exploring

across the database

Top extensions this week

1.AQQAQQ Instant Messenger File
2.CRDOWNLOADChrome Partial Download File
3.MDMarkdown Document
4.BINCD/DVD Disc Image (BIN/CUE)
5.PARTPartial Download File
6.BCBitComet Incomplete Download File
7.EXEWindows Executable (Portable Executable)
8.NOMEDIAAndroid No-Media Marker File
9.AVIFAV1 Image File Format (AVIF)
10.RPMSGRestricted Permission Message

Related extensions

.RARRAR Archive (Roshal ARchive)
.ZIPZIP Archive
.Z01Split ZIP Archive - First Part
.7Z7-Zip Archive
.001Split / multi-volume archive - first part (.001)
.ZIRenamed / Truncated ZIP Archive

Free file tools

An in-browser file identifier and image converter - everything runs on your device.

Open the toolbox

Browse file extensions A-Z