Using UnRAR in Commercial Closed-Source Software

You can legally use UnRAR in commercial, closed-source software, but your usage must strictly comply with the specific terms of the UnRAR license. The source code provided by RARLAB allows developers to incorporate the decompression engine into proprietary applications free of charge, provided the code is solely used to decompress RAR archives and not to recreate or reverse-engineer the proprietary RAR compression algorithm.

The UnRAR License Explained

UnRAR is distributed under a custom freeware license written by Alexander Roshal, the author of WinRAR. Unlike open-source licenses such as the MIT or Apache licenses, the UnRAR license contains specific usage restrictions that exclude it from the Open Source Initiative (OSI) definition of open source. However, it explicitly grants permission for commercial integration.

The license states that the UnRAR source code may be used in any software to handle RAR archives without limitations and free of charge. This means you do not need to pay royalties, purchase a commercial license, or open-source your own proprietary codebase simply because you integrated the UnRAR source.

To remain legally compliant when embedding UnRAR into a closed-source product, you must adhere to the following conditions:

  • Decompression Only: The code cannot be used to develop a RAR-compatible compressor. The RAR compression algorithm remains proprietary intellectual property. Using the decompression logic to reconstruct a compression algorithm is a direct breach of the license.
  • Copyright and Attribution: You must retain the original copyright notice in the source files and include the RARLAB copyright acknowledgement in your product’s documentation or legal notices.
  • Modifications: If you modify the UnRAR source code, you must clearly document those changes and indicate that the code has been altered from the original RARLAB release.

Integration Methods: Source Library vs. Binary Execution

There are two primary ways to incorporate UnRAR into a commercial application:

  1. Compiling the UnRAR Source Code (or libunrar): Compiling the UnRAR C++ source files directly into your application or linking against libunrar is the most common integration method. This is fully permissible under the source license for extraction purposes without requiring you to disclose your own proprietary source code.
  2. Bundling or Calling the Standalone Executable: If you distribute the precompiled unrar command-line executable alongside your software and call it via subprocesses, you must ensure that you redistribute the binary unaltered, alongside its accompanying license documentation. Alternatively, requiring end-users to provide their own installation of the UnRAR binary bypasses redistribution liabilities entirely.

Summary Checklist for Developers

Before releasing commercial, closed-source software using UnRAR, ensure that your implementation only reads and extracts RAR archives, includes the original copyright notice in your legal credits, and contains no code derived from UnRAR aimed at writing or creating RAR files. Consulting with your organization's legal counsel to review the exact UnRAR license version bundled with your build is recommended to ensure complete compliance.