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:| Component | License | Notes |
|---|---|---|
| Most source files | GNU LGPL v2.1+ | Default license for files without explicit license statements |
| RAR decompression | GNU LGPL + unRAR restriction | CPP/7zip/Compress/Rar* files |
| LZFSE decoder | BSD 3-clause | CPP/7zip/Compress/LzfseDecoder.cpp |
| ZSTD decoder | BSD 3-clause | C/ZstdDec.c |
| XXH64 hash | BSD 2-clause | C/Xxh64.c |
| Public domain files | Public domain | When explicitly stated in source file |
| LZMA SDK | Public domain | Written by Igor Pavlov |
If a source file contains no license information, it falls under the GNU LGPL license.
GNU LGPL License
GNU Lesser General Public License v2.1
GNU Lesser General Public License v2.1
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
Files Affected
All files matching the patternCPP/7zip/Compress/Rar* are subject to the “GNU LGPL with unRAR license restriction.”
unRAR License Terms
unRAR Restriction Details
unRAR Restriction Details
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:What You CAN Do:
- Cannot recreate RAR compression algorithm - The unRAR sources cannot be used to re-create the RAR compression algorithm, which is proprietary.
-
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
- 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
- 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
BSD 3-Clause License (LZFSE and ZSTD)
BSD 3-Clause License (LZFSE and ZSTD)
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
BSD 2-Clause License (XXH64)
BSD 2-Clause License (XXH64)
Public Domain Components
LZMA SDK
The LZMA SDK is written and placed in the public domain by Igor Pavlov.- Download: http://www.7-zip.org/sdk.html
- License: Public domain (no restrictions)
- Usage: Can be freely used in any project
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:RAR Exclusion Options
RAR Exclusion Options
Option 1: DISABLE_RAR_COMPRESS=1Removes “not fully free” RAR decompression codecs from compilation.Capabilities with this option:Limitations:
- Open RAR archives
- List files in RAR archives
- Extract files that are stored without compression
- Cannot decompress compressed files from RAR archives
- No RAR archive support at all
License Compatibility Summary
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 Pavlovhttp://www.7-zip.org