Create tar.gz File Online
Create a tar.gz file online from any set of files: pick them, name the archive, and get one tarball to send. The packing runs inside your browser on your own device, up to 100 MB in total with nothing uploaded, and you can switch gzip off for a plain .tar.
🔒 Files are packed inside your browser and never uploaded to a server.
How to use
- Add the files: Drop the files onto the box or click to choose them. Any file type is accepted, up to 50 MB per file and 100 MB for the selection. On a computer you can drop a whole folder and the paths inside it come along.
- Name the archive and set the options: Type an archive name — the .tar.gz or .tar suffix is added for you. Leave "Compress with gzip (tar.gz)" ticked for a compressed tarball, move the level slider if you want to, and untick "Keep folder structure" to flatten everything into the archive root.
- Pack it and save: Click "Pack into tar.gz", read the line showing how many files went in and the size before and after, then download the archive. On a phone, Save to device opens the system share sheet when the browser offers file sharing, and simply downloads the file when it doesn't.
Create tar.gz file online: how it works
Add the files you want to bundle and this page writes them into one tar archive, then compresses that archive with gzip unless you switch it off, so what you download is a single .tar.gz. Everything happens in your browser: each file is read straight from your device into memory, the archive is assembled on the page, and the download comes from that archive in memory. The contents of your files are never sent anywhere. The limits come from your own device: 50 MB per file, 100 MB for the whole selection, and up to 10,000 files in one archive.
The tar container is written field by field to the POSIX ustar layout — a 512-byte header block in front of every file, the data padded out to the next multiple of 512 bytes, and two all-zero blocks closing the archive. Entry names go in as UTF-8 bytes, so Vietnamese tone marks, Spanish accents, Chinese characters and emoji are written unaltered and come back as they were in anything that reads names as UTF-8, which includes Linux tar and this site's own tar extractor. The gzip step is done by the fflate library, which always runs it on a separate worker thread; assembling the tar itself happens on the main thread, so a large batch can make the page pause for a moment before the download appears.
Because the file contents stay on your device, this is a sensible way to bundle contracts, ID scans or source code before sending them somewhere. It is not encryption, though. A .tar.gz carries no password, so anyone who receives the archive — or anyone using your computer after you have saved it — can open it. Nothing is kept here either: refreshing or closing the tab clears both the files you picked and the archive you built.
tar.gz or plain .tar, and which gzip level
Leave "Compress with gzip (tar.gz)" ticked and the bundle is gzipped after it is packed, which is what the .tar.gz name means and how Linux software is usually distributed. Untick it and you get an uncompressed .tar instead: the files are only bundled, no data is squeezed, and the level slider switches off because it has nothing to act on. That is the setting to use when you want to create a tar archive without compression, for example because the recipient will compress or stream it themselves.
The slider sets gzip's strength from 0 to 9, with 6 as the default. Text, source code and logs hold far more repetition to work with than data that is already compressed, so the gain depends almost entirely on what you put in. The table below shows how three real files from this site's own repository came out.
Two things in the table are worth knowing before you drag the slider. First, a higher level is not reliably smaller: level 9 saved 26 bytes on the CSS file and nothing at all on the other two, and on another repository file (vitest.config.mts, 475 B) level 9 came out at 399 B against 396 B at level 6, three bytes larger. A higher level also asks your device to do more arithmetic, so it can take longer, depending on the files and the machine. Second, level 0 is not "no compression": it still wraps the data in a gzip shell, which made each archive in the table slightly larger than the plain .tar — 38, 28 and 23 bytes respectively. If you want pure bundling, untick the gzip box rather than dragging the level down to 0.
One more thing the sizes show: tar has a fixed overhead per file. A 652-byte zip becomes a 2,560-byte uncompressed tar, because of its 512-byte header, the padding, and the 1,024-byte end-of-archive marker. On a 214,889-byte file the same overhead adds about 0.8%. So a tarball of many tiny files is bigger than the sum of its parts until gzip gets to it.
| Sample | Original bytes | Plain tar bytes | Gzip level 6 bytes | Gzip level 9 bytes |
|---|---|---|---|---|
| globals.css (CSS source) | 214,889 | 216,576 | 41,394 (81% smaller) | 41,368 |
| og.png (PNG image) | 73,092 | 74,752 | 71,009 (3% smaller) | 71,009 |
| normal.zip (small zip) | 652 | 2,560 | 405 | 405 |
Each file packed separately under the entry name shown; Node 24, fflate 0.8.3, 21 November 2026. Results depend on file contents.
What the archive keeps, and what it drops
Every byte of every file comes back out unchanged. tar is a pure container and gzip is lossless compression, so unpacking the archive at any level, 0 and 9 included, gives you files identical to the ones you put in. Empty 0-byte files are packed as well, and entry names are preserved exactly, non-ASCII characters included.
With "Keep folder structure" ticked, files that came from a dropped folder go in under their relative path, like docs/2026/report.xlsx; untick it and everything lands in the root of the archive. Either way, two entries that would end up with the same path are renamed, so the second report.xlsx becomes report (1).xlsx and nothing silently overwrites anything when the archive is unpacked. The number is inserted before the last dot in the whole path, which is normally the extension; when the only dot sits in a folder name, that folder name is what changes, so a repeated folder.v1/a becomes folder (1).v1/a. Note too that browsers only report folder paths when you drop a whole folder in, and mobile browsers generally offer no folder picking at all.
Several things a Linux tar archive can carry are deliberately not written here. Modification times are all set to zero, which is 1 January 1970 — not the original time and not the time you packed, and how an extractor displays that is up to the extractor. Permissions are fixed at 0644 and the owner and group at 0, so an executable bit does not travel. Symbolic and hard links, device files, and macOS resource forks or extended attributes are not represented at all, because a browser hands the page nothing but names and bytes. Empty folders cannot be included for the same reason. The upside of those fixed timestamps is reproducibility: the same file contents with the same entry names and the same options produce a byte-for-byte identical archive, on any device and at any time.
Limits, and the messages you may run into
Three hard limits apply: 50 MB for a single file, 100 MB for the whole selection, and 10,000 files in one archive. A file exactly on the 50 MB line and a selection exactly on the 100 MB line are both accepted — only going over is refused. Oversized files are skipped as you add them, with a note saying how many were skipped, while going over the total stops the run with a message instead of quietly leaving something out of your archive. The total is counted in uncompressed bytes, so how well gzip does makes no difference to it.
Two kinds of path stop the whole run rather than one file. A path that begins with / or \, begins with a drive root such as C:\, or has .. as a complete step in it is refused, because such a path could write outside the folder it is extracted into. When that part came from the folder path, unticking "Keep folder structure" usually clears it; otherwise the file itself has to be renamed. An ordinary name with two dots in it, like report..txt, is unaffected — only a step that is exactly .. counts. The other case is length: a ustar header holds at most 100 bytes of name plus up to 155 bytes of directory prefix, so a path over roughly 255 bytes, or any single name over 100 bytes (about 100 plain letters, or around 33 Chinese characters), is named in the message and nothing is packed. Flattening rescues a path that is too long; it cannot rescue a file name that is too long on its own.
Some things are simply out of scope. This page cannot put a password on the archive, because neither tar nor gzip has any encryption. It writes tar and tar.gz only, not tar.bz2, tar.xz, zip, rar or 7z. It cannot add files to an archive you already have, since every run builds a new one, and it cannot split the output into volumes. It also cannot tell you how much each individual file compressed, because gzip works on the tar as one stream; the result line reports the original total and the finished size. Memory is the real ceiling rather than a number you can calculate: packing holds the file bytes, the finished tar and, with gzip on, a copy handed to the worker thread, so a selection close to 100 MB can still fail on a phone with little free memory.
To confirm what ended up inside, open the finished archive with Extract tar.gz Files Online.
tar.gz vs zip: which one to send
The practical difference is where the compression happens. A zip compresses each entry on its own, while a .tar.gz gzips the whole tar as a single stream, so repetition that spans several files — a folder of near-identical log files, say — can be squeezed once instead of once per file, as long as the repeats sit reasonably close together in the stream. How much that is worth depends entirely on the content, and it is why source releases on Linux are tarballs. The trade-off runs the other way for picking one file out of a large archive, which a zip's index makes cheap and a gzipped tar does not.
The other half of the decision is the person receiving it. A zip opens by double-clicking in Windows File Explorer and in macOS Finder, whereas a .tar.gz usually needs the tar command, an archiver such as 7-Zip or WinRAR, or a page like this one's counterpart for unpacking. If you are on Windows and would rather not install an archiver or learn tar flags to make a tar.gz file, this page is the short path: drop the files in, keep gzip ticked, download. Send a tarball to a Linux server, a developer or a build system; send a zip to a colleague who will click on it.
If a zip is the safer bet for whoever receives it, use Create ZIP instead.
How this tool is checked
- The logic behind this tool is covered by 19 automated test cases (hand-checked examples, edge cases and invalid input), and they run again before every release.
- Before each release, a real browser opens this page, runs it on sample files (including a damaged one) and checks the file it produces.
- Your files are processed in your browser and are never uploaded to our server.
- Formulas, figures and definitions are checked against the sources listed at the end of this page.
Frequently asked questions
- Is it safe to pack confidential files here?
- Yes — the contents of your files never leave your device. They are read into the browser's memory, packed there, and the download comes from that memory. Do remember that the archive itself has no password: whoever receives the .tar.gz, or anyone using your computer afterwards, can open it.
- What is the difference between .tar and .tar.gz?
- A .tar only bundles files together; a .tar.gz is that same bundle run through gzip afterwards, so it is normally smaller. Untick the gzip box when you just want one file to move around and compression is pointless, and leave it ticked when size matters.
- Which gzip compression level should I choose?
- Leave it at 6. In our measurements level 9 saved 26 bytes on a 214,889-byte CSS file and nothing at all on a PNG or a zip, and on one 475-byte config file it produced three bytes more than level 6. Level 0 is not "off" either: it adds a gzip wrapper, so untick the box instead.
- How many files can I pack at once, and how big?
- Up to 10,000 files, 100 MB for the selection as a whole and 50 MB for any single file. Sitting exactly on a limit is allowed; going over is refused. Your device's memory is usually the real ceiling, so a selection close to 100 MB can still run out of room on a phone.
- Why does it say a file path isn't allowed?
- One of the paths begins with / or \, begins with a drive root like C:\, or contains .. as a whole step, so nothing was packed. Such a path could write outside the extraction folder. Untick "Keep folder structure" if that part came from the folder path; otherwise rename the file. A name like report..txt is not affected.
- Will my folder structure, dates and permissions survive?
- Folders yes, dates and permissions no. With "Keep folder structure" ticked the relative paths go into the archive, although duplicate paths get a number added. Modification times are all written as zero, which is 1 January 1970, permissions are fixed at 0644, and owner and group are 0 — a browser cannot read any of that anyway.
- Can I put a password on the tar.gz?
- No. Neither tar nor gzip has an encryption mechanism, so there is nothing to set a password on. If the files need protecting in transit, encrypt the finished archive on your own machine — 7-Zip's AES-256 option or gpg — or agree a secure channel with the recipient.
- Does it work on an iPhone or Android phone?
- Yes, in modern mobile browsers. You can select multiple files when the file picker supports it; whole-folder selection depends on the browser. Keep large batches for a computer because packing uses device memory.
Related tools
Cite this tool
Using a result in a report, paper or assignment? Copy a ready-made reference.
Gingertool. (2026). Create tar.gz File Online [Online tool]. Retrieved November 21, 2026, from https://gingertool.com/en/file-tools/create-tar-gz/
“Create tar.gz File Online.” Gingertool, November 21, 2026, https://gingertool.com/en/file-tools/create-tar-gz/. Accessed November 21, 2026.
@misc{gingertool-create-tar,
author = {{Gingertool}},
title = {Create tar.gz File Online},
year = {2026},
url = {https://gingertool.com/en/file-tools/create-tar-gz/},
note = {Accessed: 2026-11-21}
}