Skip to main content

Overview

7-Zip is free software distributed primarily under the GNU LGPL license, with specific exceptions for certain components. 7-Zip Copyright (C) 1999-2026 Igor Pavlov.

License Summary by Component

The 7-Zip source code uses different licenses depending on the specific files:
If a source file contains no license information, it falls under the GNU LGPL license.

GNU LGPL License

Most of the 7-Zip source code is licensed under the GNU Lesser General Public License (LGPL) version 2.1 or later.
Key Points:
  • Free to use, modify, and redistribute
  • No warranty provided
  • Must comply with LGPL terms for distribution
  • See DOC/copying.txt for full license text

unRAR License Restriction

The RAR decompression code has additional restrictions beyond the GNU LGPL. You must comply with BOTH the GNU LGPL and the unRAR license restriction.

Files Affected

All files matching the pattern CPP/7zip/Compress/Rar* are subject to the “GNU LGPL with unRAR license restriction.”

unRAR License Terms

The decompression engine for RAR archives was developed using source code from the unRAR program.Copyright: All copyrights to original unRAR code are owned by Alexander Roshal.Key Restrictions:
  1. Cannot recreate RAR compression algorithm - The unRAR sources cannot be used to re-create the RAR compression algorithm, which is proprietary.
  2. Distribution requirements - Distribution of modified unRAR sources (in separate form or as part of other software) is permitted, provided that:
    • It is clearly stated in the documentation
    • It is clearly stated in source comments
    • The code may NOT be used to develop a RAR (WinRAR) compatible archiver
Permitted Uses:
What You CAN Do:
  • Use compiled files under GNU LGPL rules (unRAR license has minimal restrictions on compiled files)
  • Link compiled files to LGPL programs
  • Fix bugs in source code and use the compiled fixed version
  • Decompress RAR archives
  • Handle RAR archives in your software
What You CANNOT Do:
  • Use unRAR sources to re-create the RAR compression algorithm
  • Develop a RAR (WinRAR) compatible archiver
  • Charge fees for distributing unRAR without written permission from Alexander Roshal

Disclaimer

BSD 3-Clause License

The following components use the BSD 3-clause License:

LZFSE Decompression

  • File: CPP/7zip/Compress/LzfseDecoder.cpp
  • Origin: Derived from LZFSE compression library by Apple Inc.
  • Copyright:
    • (c) 2015-2016, Apple Inc. All rights reserved.
    • (c) 2023-2026 Igor Pavlov.

ZSTD Decompression

  • File: C/ZstdDec.c
  • Origin: Developed using original zstd decoder code as reference
  • Original Developer: Facebook Inc.
  • Copyright:
    • (c) Facebook, Inc. All rights reserved.
    • (c) 2023-2026 Igor Pavlov.

License Text

BSD 2-Clause License

XXH64 Hash Function

  • File: C/Xxh64.c
  • Origin: Derived from original XXH64 code by Yann Collet
  • Copyright:
    • (c) 2012-2021 Yann Collet.
    • (c) 2023-2026 Igor Pavlov.

License Text

Public Domain Components

LZMA SDK

The LZMA SDK is written and placed in the public domain by Igor Pavlov.

Other Public Domain Files

Some files in the 7-Zip source are explicitly marked as public domain in their source code headers.

Compilation Options for License Compliance

Excluding RAR Code

If the unRAR license restrictions are not compatible with your project’s requirements, you can exclude RAR-related code during compilation:
Option 1: DISABLE_RAR_COMPRESS=1Removes “not fully free” RAR decompression codecs from compilation.
Capabilities with this option:
  • Open RAR archives
  • List files in RAR archives
  • Extract files that are stored without compression
Limitations:
  • Cannot decompress compressed files from RAR archives
Option 2: DISABLE_RAR=1Completely removes all RAR-related code from compilation.
Limitations:
  • No RAR archive support at all

License Compatibility Summary

When distributing 7-Zip or incorporating it into your project, ensure you comply with ALL applicable licenses:
  • GNU LGPL for most code
  • GNU LGPL + unRAR restriction for RAR decompression
  • BSD 3-clause for LZFSE and ZSTD decoders
  • BSD 2-clause for XXH64 hash
  • Public domain for LZMA SDK
The unRAR restriction is the most restrictive component and may not be compatible with some free-software licenses.

Additional Resources

  • License.txt - Complete license documentation
  • copying.txt - Full GNU LGPL license text
  • unRarLicense.txt - Complete unRAR license
  • GNU LGPL: http://www.gnu.org/

Contact

For licensing questions or permissions: Igor Pavlov
http://www.7-zip.org