Convert LHA to 7Z Online (Trading a 64 KiB Window for a Multi-Gigabyte One)

LHA tops out at a 64 KiB compression window designed for 1980s hardware; 7z's LZMA algorithm can use a window measured in gigabytes.

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

An Archive Format Built for Floppy-Era Hardware Meeting One Built in 1999

LHA — also known by its .lzh extension — was created in 1988 by Haruyasu Yoshizaki, whose LHarc tool combined LZSS-style dictionary matching with Huffman coding under the name LZHUF. It became a standard archive format on Japanese bulletin board systems and on Amiga computers, and its development has been effectively frozen for years. The 7z format arrived over a decade later, built by Igor Pavlov for his 7-Zip archiver, and it centers on the LZMA algorithm — a substantially more advanced dictionary compressor that Pavlov also used, in updated form, inside the xz format still used across Linux distributions today.

Converting an LHA archive to 7z means fully decompressing every entry using LHA's specific method tags — most commonly -lh5-, an 8 KiB window with static Huffman tables, though older or specialized archives may use -lh1- through -lh7- — and recompressing that same data through LZMA's much larger search window. The files that come out are identical; only the compression wrapper and, potentially, the resulting file size change.

The two formats also differ in how they store file lists internally. LHA tags each entry with its own header, including its own header level (0 through 3) that controls how much metadata, like timestamps, gets recorded and in what format. 7z instead separates its metadata into its own compressed stream apart from the file data itself, which lets 7-Zip compress the list of names, sizes, and attributes as its own small block rather than storing that information uncompressed alongside each entry the way older formats typically do.


Why LZMA's Search Window Beats LHA's by Orders of Magnitude

LHA's most advanced compression method, -lh7-, uses a sliding window of 64 KiB — meaning the compressor can only find and reuse repeated patterns that occur within roughly 64,000 bytes of each other. That ceiling made sense for the floppy-disk-based systems the format targeted in the late 1980s, where files themselves were often smaller than that window. LZMA, the algorithm inside 7z, supports dictionary sizes that scale into the gigabytes on current hardware, meaning it can spot a repeated pattern that occurred megabytes earlier in the same file and still compress it away, something no LHA method was ever designed to do.

The entropy coding stage differs too. LHA's later methods use static Huffman tables, computed once and applied throughout a block, while LZMA layers a range coder — a more precise relative of arithmetic coding — on top of its LZ77-style matching, extracting slightly more compression out of the same matched data than Huffman coding alone typically can. The combined effect of a vastly larger window and a more precise entropy stage is why converting old LHA archives to 7z often shrinks them noticeably further, especially for larger files where LHA's small window never got the chance to find distant repeats in the first place.


What Actually Changes Going From LHA to 7z

  • Gain — usually a smaller file: LZMA's much larger dictionary window and range coding typically outperform LHA's capped 64 KiB window and Huffman coding on the same data.
  • Gain — real password protection: 7z supports AES-256 encryption of both file contents and filenames; the classic LHA format was never built with any encryption option at all.
  • Gain — a format still receiving maintenance: 7-Zip actively updates the 7z format and its own software, while LHA's tooling has been effectively frozen for years.
  • Lose — the narrow legacy niche LHA still serves: Amiga software and older Japanese-market programs that specifically expect .lha or .lzh files won't recognize a 7z archive at all.
  • Gain — solid compression across multiple files: 7z can compress a whole set of files as one continuous stream, letting LZMA find repeated patterns across file boundaries, something LHA's per-file method tagging doesn't do the same way.
  • Lose — accurate timestamps beyond 2038: this limitation exists on both sides, since older LHA header levels rely on 32-bit or smaller time fields, though 7z's own timestamp handling avoids the pre-2011 wraparound bug specific to LHA's oldest header levels.

Where Each Format Actually Opens Without Extra Software

Neither format ships with native Windows Explorer support — 7z requires 7-Zip specifically installed, while LHA requires a tool beyond even the standard 7-Zip build, since 7-Zip's official release has never added LHA/LZH support despite it being a long-requested feature on the project's own discussion forum. Once 7-Zip is installed, though, 7z becomes trivially easy to create and open on Windows, macOS (through the command-line p7zip port or a GUI front end), and Linux, while LHA remains dependent on a narrower set of tools like PeaZip, which specifically lists LHA/LZH among its supported formats, or WinRAR, which can extract but not create LZH archives.

This is effectively a one-way improvement in reach: converting from LHA to 7z moves files from a format with almost no current native support into one with a single well-known free tool covering all three major desktop operating systems. On Linux specifically, the p7zip package that handles 7z is packaged directly in most major distributions' repositories, while an equivalent LHA extraction package, where it exists at all, tends to be a much smaller, less consistently maintained community project.


The Real Complaints Behind Converting Old LHA Archives

The most common reason people go looking for an LHA-to-7z conversion in the first place is simply that nothing on their current computer opens the old .lzh file at all — since Windows never included native support and even 7-Zip's standard build doesn't cover it, a file that opened fine on an old Japanese PC or an Amiga system 20 years ago now sits unreadable until a specific tool like PeaZip is tracked down.

A second documented issue is garbled filenames after extraction, caused by LHA archives built on Japanese-locale systems storing names in Shift-JIS encoding; a tool assuming a different encoding produces unreadable filenames even though the underlying files decompress correctly. Converting to 7z after a successful extraction, with filenames corrected through an encoding-aware extractor, avoids carrying that same problem forward.

A third concern applies to old, unmaintained LHA extraction tools specifically: documented vulnerabilities (CVE-2004-0234 and CVE-2004-0235) let a maliciously crafted LHA archive trigger a buffer overflow or write files outside the intended folder in the Unix lha utility through version 1.14. Converting suspicious old archives using current, actively maintained software rather than decades-old LHA tools avoids exposure to those specific, patched-long-ago bugs.

A fourth pattern shows up around old timestamps: files packed into an LHA archive using a level 0 or level 1 header before the format's 7-bit year field problem was widely understood can show a creation date of 1980 instead of their real date once opened by a strict reader, since any year past 2011 wraps back around in that older header format. Converting to 7z doesn't recover a timestamp that was already misrecorded this way, but it does prevent the same bug from ever affecting the archive again going forward.


LHA and 7z Side by Side

Feature LHA (-lh5-/-lh7-) 7z (LZMA)
Compression window Up to 64 KiB Up to several gigabytes
Entropy coding Static/dynamic Huffman Range coding (arithmetic-style)
Encryption Not part of the classic format AES-256, including filenames
Windows native support None, ever None built in; 7-Zip required
7-Zip support Not in the standard build Full — it's 7-Zip's own format
Active development Effectively frozen Ongoing
Solid-archive compression Not standard Yes, supported directly

Questions People Ask When Moving LHA Archives to 7z

Will the converted 7z file be smaller than the original LHA archive?
Usually, yes. LZMA's much larger compression window and range coding generally outperform LHA's capped 64 KiB window and Huffman coding, though the exact savings depend on what the archive actually contains.

Why can't I open my old .lzh file with 7-Zip?
Because the standard 7-Zip release has never included LHA/LZH support, despite it being a long-standing user request on the project's own forum. A tool like PeaZip, which lists LHA/LZH natively, is needed to open it first.

Can I add a password when converting LHA to 7z?
Yes. 7z supports AES-256 encryption for both file contents and filenames, a feature the classic LHA format never included at all.

Does converting to 7z fix garbled Japanese filenames from an old LHA archive?
It can, if the extraction step correctly reads the original Shift-JIS-encoded names before repacking. The garbling happens during extraction, not because of the target format, so using an encoding-aware extractor first is the key step.

Is it worth converting old LHA archives to 7z at all?
For anything beyond a narrow legacy use case like Amiga software, yes — 7z is actively maintained, opens with one widely available free tool across major operating systems, and generally compresses better than the decades-old LHA format.