File Operations

TAR.GZ Creator

Bundle multiple files or folders into a tar archive entirely in your browser, then compress it with gzip and download it in whichever format you need: .tar.gz, .tgz, .tar (uncompressed), or .gz (single file). Handy for uploading to a Linux server. Files are never sent to a server.


Tips for Creating a TAR.GZ

  • Drop a whole folder and it will be bundled into the tar with its original folder structure preserved. If you select individual files instead, the resulting archive will be flat, with no folder structure.
  • .tar.gz and .tgz are identical in content — only the extension differs. If you're handing the file to a tool that expects the .tgz extension, such as an npm package, choose .tgz.
  • Choosing ".tar (no compression)" skips the gzip step. When bundling files that are already compressed — images, video, ZIP files, and the like — the size barely changes either way, so skipping compression is faster.
  • .gz is an old-fashioned format that compresses a single file directly without using tar. It can only be selected when there is exactly one file, such as when you just want to compress a single log file.
  • Bundling a huge number of files, or very large files, can take a while since everything is processed in your browser's memory — and it may even fail depending on your device. For anything from a few hundred megabytes up to several gigabytes, we recommend splitting the job into a few smaller archives.

Frequently Asked Questions

No. Compression happens entirely inside your browser, and the file's contents are never sent to a server.

They're identical in content. .tgz is a holdover from older operating systems that required filenames of 8 characters or fewer — it's simply a shorter alias. Unless the recipient or tool specifically requires otherwise, the common .tar.gz is a safe default.

No, this isn't supported, since the tar and gzip formats themselves have no password-protection mechanism. If you need password protection, use our sister tool, the ZIP Creator.

It's faster, since it skips the gzip compression step. When bundling files that are already compressed — JPEG, MP4, ZIP, and the like — compression barely changes the size, so skipping it is the better choice.

Use the "GZ/TAR.GZ Extractor" tool in the same File Operations category. It supports .gz, .tar.gz, .tgz, and .tar files.
ツールくん

Side Note — tar's 512-Byte Blocks and the PAX Extended Header

The tar file format was designed in the 1970s for magnetic tape drives (Tape ARchive), so its data is divided into 512-byte "blocks." When a file's contents aren't an exact multiple of 512 bytes, zero-padding is added at the end to round it up to the next block boundary. Thanks to this simple structure, tar remains an easy format to implement and one that works well with streaming, even today.

The header in the old ustar format reserves only 100 bytes for the filename field. Bundling deeply nested folders or long filenames into a tar can exceed this limit. The PAX extended header was devised to solve this: it inserts a special block recording the "real name" immediately before the actual entry, effectively working around the length restriction. This tool automatically adds a PAX extended header for any path longer than 100 bytes.

Unlike ZIP, the tar-plus-gzip combination has no password-protection mechanism. That's because tar is designed to do just one thing — bundling — and gzip is designed to do just one thing — compressing. If you need to distribute sensitive files, use our sister tool, the ZIP Creator, which supports encryption.