Skip to converter

TGZ to ZIP — unwinding gzip and tar, then writing one fresh archive

A source release named project.tar.gz combines a gzip compression wrapper with a TAR container. If your recipient or upload form requires ZIP, this route decompresses the wrapper, reads supported USTAR members and builds a ZIP at your chosen deflate level. Everything happens in the tab; member files are not automatically extracted into folders.

Members are deflated again; original stored sizes and compression settings are not reproduced.

Drop files here or TGZ, up to 12 MB
    Add a file to start.

    Processed on your device. Files aren’t sent anywhere.

    No sign-up. Nothing to install.

    Two layers in, one layer out

    The gzip checksum covers its uncompressed stream. Once that stream has been decoded, the reader checks TAR headers and copies supported member payloads into a new ZIP. TAR itself adds no per-member payload checksum.

    TAR bundles the files; gzip compresses that bundle. Converting to ZIP changes how the bundle is organised and compressed, rather than undoing two compression layers.

    The container-versus-compression distinction

    What each layer contributes

    Neither input layer survives the conversion. The output carries its own compression settings and its own directory.

    LayerOn inputIn the output
    gzip streamdecompressed, checksum validateddiscarded; no gzip layer in the ZIP
    tar member headersread for names and payload lengthsrewritten as ZIP entries
    member payload bytespreserved exactlywritten again, deflated at your level
    deflate levelnot present in tarchosen by you: 1, 6 or 9, default 6
    gzip header name and timemay exist in the streamnot preserved

    Names that do not survive the round trip

    This reader accepts paths represented directly in USTAR fields. It rejects PAX and GNU extension records used by some producers for longer names or metadata. It cannot recover a name that the original producer already truncated.

    Names that are neither ASCII nor valid UTF-8 are refused as well, along with symlinks, hardlinks, device entries, PAX or GNU extended headers, absolute or traversal paths and duplicate paths. Timestamps, permissions, owners, comments and extra fields are not preserved; names and payload bytes are.

    Converting the release

    One file at a time, up to 12 MiB, with the bounds enforced while the stream decompresses.

    • At most 200 entries are read and each member is capped at 8 MiB.
    • The gunzipped TAR stream, including headers and padding, must fit 32 MiB and the 60x input-to-expanded ratio. Member payload limits are checked as well.
    • Members land in the new ZIP in tar order; sorted-by-name is there when the receiving side expects an alphabetical directory.
    • The rebuilt ZIP may be larger or smaller than the .tar.gz. Gzip compresses a whole TAR stream, while ZIP compresses files individually; measure your actual release rather than assuming one wins.
    • Cancellation stops the read mid-stream, so a wrong bundle can be abandoned.

    Release conversion questions

    Does the ZIP keep the tar.gz compression?
    No. The gzip layer is unwound and the members are recompressed with deflate at the level you choose, so compression metadata resets.
    Will the original file dates appear in the ZIP?
    No. Timestamps, permissions, owners, comments and extra fields are not carried over; names and payload bytes are preserved.
    Is .tgz handled the same as .tar.gz?
    Yes. Both extensions name a gzip-compressed tape archive, and both are read the same way.
    Does the conversion unpack the release to my disk?
    No. Members are streamed in the tab and written into the ZIP you download; no folders are created and nothing is uploaded.

    Share this converter

    More sharing options