Convert TAR to 7Z Online (Adding Compression a Plain Tar Never Had)

A plain .tar file has never been compressed at all — converting it to .7z is the step that actually runs LZMA2 against the data, and the one that decides whether Unix ownership survives the trip.

  1. Add a file Choose or drop it here
  2. Pick the format Change it whenever needed
  3. Download the result After conversion completes

What a Plain TAR Archive Is and Where 7-Zip's Own Format Comes From

A .tar file is a Unix bundling format going back to Seventh Edition Unix in January 1979, where its job was writing files sequentially to magnetic tape drives — the third program to try solving that problem, after tp and tap on earlier Unix editions. It stores each file as a 512-byte header (filename, size, Unix permission bits, numeric owner and group IDs, modification time) immediately followed by that file's raw data, padded to the next 512-byte boundary. The core layout was formalized as USTAR under the POSIX.1-1988 standard, and it applies zero compression of its own — a 100 MB folder wrapped in .tar comes out around 100 MB plus a small amount of header overhead.

.7z is a completely different kind of format, released in 1999 by Russian software engineer Igor Pavlov as the native archive type of his 7-Zip project. It's built around the LZMA algorithm (Lempel-Ziv-Markov chain) and its successor LZMA2, both dictionary-based compressors designed to find repeated data across a much larger span of a file than older methods like DEFLATE. Unlike tar, 7z has its own internal file listing and can hold many files directly, with no separate bundling step needed first — and unlike tar, its entire purpose is shrinking the data, not just packaging it.

Converting a .tar to .7z, in practice, means unpacking tar's header-per-file structure entirely and rebuilding those same files inside 7-Zip's own container format, where LZMA2 compresses each file's data directly against 7z's internal entry structure rather than against a continuous tar byte stream. That's a genuinely different outcome from just running 7-Zip on top of an unmodified .tar file, which instead produces a .tar.7z — a compressed tar, not a native 7z archive.


The Real Technical Relationship Between TAR's Header and 7Z's LZMA2 Compression

Tar's 512-byte header is the only place in the original archive where Unix permission bits, numeric UID and GID, and symlink target paths are recorded — plain ASCII and octal digits sitting directly in the file, readable without any special decoding. When a tar archive is rebuilt as a native .7z, that header structure disappears, because 7z's own container format has no standard field defined for Unix ownership or permission-mode data at all. The files themselves come through intact; the Unix-specific metadata that described them does not, unless something outside the archive format itself is tracking it separately.

On the compression side, LZMA2's default dictionary size in 7-Zip is 16 MB at the normal compression level, rising to 32 MB at maximum (-mx=7) and 64 MB at ultra (-mx=9) — meaning LZMA2 can find repeated patterns across tens of megabytes of a file at once, far beyond DEFLATE's fixed 32 KB window. Whether that produces a genuinely smaller result than compressing the same content another way depends entirely on what's inside the tar: plain text and source code typically shrink substantially under LZMA2, while already-compressed content like JPEG photos or MP4 video shrinks by only a percent or two, since there's little repeated structure left for LZMA2 to find.

7z also supports the PPMd compression method as an alternative to LZMA2 for a given archive, a prediction-based algorithm that can outperform LZMA2 specifically on plain text, though LZMA2 remains 7-Zip's default choice for general-purpose archives and is the method most tar-to-7z conversions actually use.


What Compressing a TAR Archive Into 7Z Gains and Costs

  • Gain — real, often substantial size reduction: tar itself never compresses anything, so moving to 7z's LZMA2 is the actual point at which the archive gets smaller, sometimes dramatically for text-heavy content.
  • Gain — a much wider compression dictionary than gzip or bzip2: LZMA2's 16-64 MB default dictionary window finds repetition across far more of the file than gzip's 32 KB or bzip2's 900 KB blocks, generally producing a smaller result on the same content.
  • Gain — optional strong encryption on the way in: 7z supports AES-256 encryption for file contents and, when enabled, for filenames too — a feature plain tar has never had at all.
  • Gain — a single native multi-file container: once rebuilt, the archive has 7z's own internal file listing, letting some tools browse contents without unpacking the whole thing the way a header-only tar scan would require.
  • Lose — Unix ownership and permission bits: UID, GID, and permission-mode fields that lived in tar's header have no equivalent field in 7z's own format, and are dropped unless captured some other way before conversion.
  • Lose — symbolic links, unless a non-default flag is used: 7-Zip only preserves symlinks as symlinks when the archiver is run with the explicit -snl switch; without it, a symlink from the original tar becomes a plain regular file in the resulting 7z.

Which Versions of 7-Zip and p7zip Actually Read a Converted 7Z Archive

For years, the only way to build or open .7z archives outside Windows was p7zip, a third-party command-line port of 7-Zip for Unix-like systems — but p7zip has had no real release since 2016, and many Linux package managers still default to that aging, unmaintained 16.02 build, which can't take advantage of AES-NI, AVX2, or other instruction sets modern CPUs have supported for years. In March 2021, 7-Zip's own developer, Igor Pavlov, released the first official Linux and macOS builds directly from the 7-Zip source, distributed as a standalone command-line binary called 7zz, made specifically because p7zip had gone unmaintained for four to five years by that point.

On Windows, 7-Zip's own graphical and command-line tools read and write .7z natively going back to the format's 1999 introduction, and Windows 11's 24H2 update added native File Explorer support for opening .7z archives directly by double-clicking, using the open-source libarchive project rather than 7-Zip's own code. GNU tar and BSD tar, the default tools on Linux and macOS respectively, have no built-in ability to read or write .7z at all, since 7z compression sits outside tar's own format entirely — converting from tar to 7z on those systems requires 7-Zip or p7zip specifically, not tar itself.

PeaZip, a free graphical archiver for Windows and Linux, also creates and opens .7z archives, and macOS's built-in Archive Utility can decompress a .7z file it receives but cannot create one through its default double-click compression shortcut, which only ever produces plain ZIP output — building a .7z on macOS in practice still means installing 7-Zip's own macOS build or p7zip.


Real Problems Reported Converting Tar Archives Into 7Z

A recurring complaint on Unix system administration forums involves someone converting a Linux backup from .tar to .7z expecting a smaller, more convenient single archive, then discovering after extraction on a different machine that every file came back owned by the extracting user instead of its original owner — a direct, documented consequence of 7z having no field to store UID or GID in the first place, not a bug in any specific tool.

A second documented pattern involves symbolic links inside a tar archive turning into duplicate regular files once repacked as .7z, because the conversion didn't use 7-Zip's non-default -snl flag during the rebuild — a genuinely avoidable outcome, but one that requires deliberately setting that option, since it isn't the default behavior in either the graphical or command-line version of the tool.

A third reported issue involves someone running 7-Zip's compression directly on top of an existing .tar file, expecting it to be converted into a native 7z, and instead getting a .tar.7z — a compressed tar, not a rebuilt 7z container — because 7-Zip simply compressed the tar file as a single blob rather than unpacking and re-adding its contents individually to a new archive.

A fourth complaint, seen on Linux distribution package-manager forums, involves an old p7zip build (still the default on many systems since it hasn't had a real release since 2016) producing noticeably slower compression times and occasionally failing on newer 7z archive variants than Igor Pavlov's official 7zz binary released for Linux and macOS in March 2021 — a version gap rather than a flaw in the 7z format itself.


TAR and 7Z Measured Side by Side After Conversion

Feature Plain TAR Native 7Z
Compression None LZMA2 (or PPMd), default level 5
Default dictionary size Not applicable 16 MB normal, 32 MB max, 64 MB ultra
Unix permissions/ownership Native, in every header Not stored by default
Symlink preservation Native, dedicated entry type Only with -snl flag set
Password/encryption support None AES-256, optional filename encryption
Released / standardized 1979, USTAR under POSIX.1-1988 1999, by Igor Pavlov
Default Linux/Unix tool GNU tar (built in) Official 7-Zip (7zz) since March 2021, or p7zip

Common Questions About Converting TAR to 7Z

Will converting my TAR file to 7Z make it smaller?
Usually, yes, and often substantially, because plain tar applies zero compression while 7z's LZMA2 algorithm actively compresses the data. How much smaller depends on the content — plain text shrinks a lot, already-compressed media like JPEGs or MP4s shrinks by very little.

Will my Unix file permissions survive being converted to 7Z?
No, not by default. 7z's own format has no standard field for Unix ownership or permission-mode data, so that information from the original tar header is lost once the archive is rebuilt as a native 7z.

What happens to symbolic links when I convert TAR to 7Z?
Unless the conversion tool specifically uses 7-Zip's non-default -snl flag, symlinks from the original tar archive typically become plain duplicate files in the resulting 7z, rather than staying symlinks.

Is converting TAR to 7Z the same as just compressing the .tar file itself?
No. Simply running 7-Zip's compressor on an existing .tar file produces a .tar.7z — a compressed tar, still with the tar header structure inside. A true conversion to native 7z means unpacking the tar entries and re-adding them individually to a new 7z container.

Can I create a 7z archive on Linux without extra software?
Not with tar alone, since GNU tar has no built-in ability to write .7z. You'll need either 7-Zip's official 7zz binary, released for Linux in March 2021, or the older, unmaintained p7zip package that most package managers still ship by default.

Does 7Z support password protection the way TAR doesn't?
Yes. 7z supports AES-256 encryption for file contents, and optionally for filenames as well, a feature the plain tar format has never included at any point in its history.