Mozilla Public License 2.0: File-Level Copyleft

Understand the Mozilla Public License 2.0 (MPL-2.0), a weak copyleft license that requires sharing changes to existing files while allowing proprietary extensions.

Individual Licenses

Detailed Explanation

Mozilla Public License 2.0

The MPL-2.0 is a weak copyleft license created by the Mozilla Foundation. It occupies a middle ground between fully permissive licenses (MIT, Apache) and strong copyleft licenses (GPL) by applying copyleft at the file level rather than the project level.

File-Level Copyleft

The key concept of MPL-2.0 is file-level copyleft. If you modify an MPL-2.0 licensed file, you must make your changes to that specific file available under MPL-2.0. However, you can add new files under any license, including proprietary licenses. This is in contrast to GPL, where the entire combined work must be GPL.

Key Characteristics

Attribute Value
SPDX Identifier MPL-2.0
Type Weak Copyleft
Patent Grant Yes
Copyleft Yes (file-level)

Permissions

  • Commercial use — Commercial use is allowed
  • Modification — You can modify the code
  • Distribution — You can distribute copies
  • Patent use — Includes patent grant
  • Private use — Private use is allowed

Conditions

  • Disclose source — Modified MPL files must have their source disclosed
  • License and copyright notice — Must include the license
  • Same license (file) — Modified MPL files must remain under MPL

MPL-2.0 vs LGPL

Both are weak copyleft licenses, but they draw the boundary differently. LGPL applies copyleft to the entire library (but not to programs that merely link to it), while MPL-2.0 applies copyleft to individual files. MPL-2.0 is generally considered simpler and more modern.

Notable Projects

  • Firefox browser
  • Thunderbird email client
  • LibreOffice (dual-licensed MPL/LGPL)
  • HashiCorp Terraform (older versions)

Use Case

Licensing projects where you want to ensure improvements to existing code are shared back, while allowing companies to build proprietary products that incorporate your library.

Try It — License Identifier

Open full tool