Skip to main content
FOSSA Logo
Free License Tool

Is MPL 2.0 compatible with Apache 2.0?

MPL 2.0-licensed code is conditionally compatible with a Apache 2.0 project. Here is what that means for your obligations, conflicts, and distribution.

The license of the code you want to use.

The license you are applying to your project.

MPL 2.0Apache 2.0
Conditional

The short answer

MPL 2.0 is weak copyleft — you must share the source of the specific modified files, but the rest of your project can stay under Apache 2.0.

Key obligations

Keep the MPL 2.0 code in separate files and provide their source if you distribute.

Potential conflicts

File-level boundaries apply. Strong-copyleft targets may pull in more depending on how the code is linked.

Distribution notes

The larger work can be under Apache 2.0, but the MPL 2.0 files stay under MPL 2.0.

Stop guessing. Start automating.

Modern applications pull in hundreds of transitive dependencies. A manual check can't keep up.

Disclaimer: This tool offers general guidance based on widely accepted open source community norms and does not constitute legal advice. For commercial use, always consult legal counsel or use a dedicated compliance platform like FOSSA to analyze your specific dependency graph.

What this means in practice

Mozilla Public License 2.0 is a weak copyleft license and Apache License 2.0 is a permissive (+ patent grant) license. Whether you can combine them depends on the details: how the code is linked, whether you modify it, and how you distribute it. Treat the obligations below as a starting point and get legal review before a commercial release.

Compliance checklist for MPL 2.0 Apache 2.0

  • Keep MPL 2.0 code in clearly separated files or modules.
  • Map which obligations apply to your distribution model (binary, SaaS, or internal).
  • Document the boundary between MPL 2.0 and Apache 2.0 code.
  • Obtain legal review before a commercial or public release.

About these licenses

Mozilla Public License 2.0

Library

Weak, file-level copyleft. You must share changes to MPL-covered files, but the rest of your project can use another license.

Type
Weak copyleft
Patent grant
Express
Source sharing
Modified files only

Apache License 2.0

Project

Permissive, with an express patent grant and a NOTICE-file requirement. Its patent terms make it incompatible with GPL v2.0.

Type
Permissive (+ patent grant)
Patent grant
Express
Source sharing
Not required

MPL 2.0 and Apache 2.0: frequently asked questions

Common questions about combining Mozilla Public License 2.0 and Apache License 2.0.

Is MPL 2.0 compatible with Apache 2.0?

MPL 2.0 is weak copyleft — you must share the source of the specific modified files, but the rest of your project can stay under Apache 2.0.

Can I use MPL 2.0 code in a Apache 2.0 SaaS or cloud application?

Over SaaS, traditional copyleft licenses like MPL 2.0 often do not trigger their share-alike requirements (the "SaaS loophole"). This is legally complex and only conditionally compatible.

What are my obligations when combining MPL 2.0 and Apache 2.0?

Keep the MPL 2.0 code in separate files and provide their source if you distribute. The larger work can be under Apache 2.0, but the MPL 2.0 files stay under MPL 2.0.

Explore related comparisons

Get Started with FOSSA

Start managing your dependencies, licenses, and vulnerabilities today.