DevTools Logo

Open Source License Compatibility Matrix

Open Source License Compatibility Matrix

Check whether dependency licenses can be combined with your project's license, with obligations and reasons.

Runs in your browser
Try an example

Dependency licenses

4 selected
Dependency licenses (SPDX identifiers)

Decisions for MIT

1 permitted · 1 conditional · 2 not compatible
Not legal advice. These verdicts summarise published FSF, Apache and Mozilla guidance for one-way use; review them with a lawyer before shipping.
  • MIT
    Permitted

    MIT is permissive and can be included in MIT; preserve the stated notices where applicable.

    Obligations: Keep copyright and license notice

  • Apache-2.0
    Conditional

    Permitted in MIT when Apache notices, patent terms, and modification markings are retained.

    Obligations: Keep notices and NOTICE file · Include patent-grant terms · Mark modified files

  • GPL-3.0-only
    Not compatible

    GPL-3.0 requires the combined work to be GPL-3.0; it cannot remain MIT.

    Obligations: Distribute corresponding source · License the combined work under GPL-3.0 · Provide installation information for consumer products

  • AGPL-3.0-only
    Not compatible

    AGPL-3.0 applies copyleft to network interaction and requires an offer of source; the selected project license does not preserve those terms.

    Obligations: Distribute corresponding source · Offer source to users interacting over a network · License the combined work under AGPL-3.0

Examples

Apache-2.0 inside GPL-3.0 is allowed

Input
checkCompatibility("Apache-2.0", "GPL-3.0")
Output
status: "yes" — Apache-2.0 patent and notice terms are compatible with GPL-3.0-family terms.

The Apache patent grant flows into GPL-3.0, so the one-way combination is permitted.

GPL-2.0 inside Apache-2.0 is denied

Input
checkCompatibility("GPL-2.0", "Apache-2.0")
Output
status: "no" — GPL-2.0-only requires the combined distribution to remain GPL-2.0.

The GPL-2.0 copyleft cannot be absorbed by Apache-2.0, and the rationale names the conflict.

About this tool

License Compatibility Matrix answers one directional question with checkCompatibility(dependency, project): can code under license X ship inside a project licensed Y? Fifteen licenses are modeled (MIT, BSD-2-Clause, BSD-3-Clause, Apache-2.0, GPL-2.0, GPL-3.0, LGPL-2.1, LGPL-3.0, AGPL-3.0, MPL-2.0, EPL-2.0, CDDL-1.0, Unlicense, CC0-1.0, ISC), each with a family (permissive, weak-copyleft, copyleft, network-copyleft, public-domain) and an obligations list. Every decision returns status yes, conditional, or no with a Permitted/Conditional/Not compatible label, a rationale sentence, and the dependency's obligations.

The decisive one-way rules are encoded directly: permissive MIT/BSD/ISC/Unlicense/CC0-1.0 are yes everywhere, Apache-2.0 is yes in GPL-3.0/LGPL-3.0/AGPL-3.0 but no in GPL-2.0/LGPL-2.1 over patent and additional-terms conflicts, GPL-2.0-only is yes solely in GPL-2.0, GPL-3.0 is yes in GPL-3.0/AGPL-3.0, and AGPL-3.0 is yes solely in AGPL-3.0 because of network copyleft. Weak-copyleft LGPL/MPL/EPL/CDDL entries are yes in same-license, GPL-3.0, or AGPL-3.0 projects and conditional elsewhere with covered-file and source-supply duties.

checkMatrix(project, dependencies) maps one project over a dependency list in order, so a MIT project pulling MIT, GPL-3.0, and AGPL-3.0 reports permissive, copyleft, and network rationales respectively. getLicenseInfo exposes names, families, and obligations such as Apache-2.0 patent grants and MPL-2.0 covered-file source duties. Unknown IDs throw Unknown license rather than guessing.

How to use this tool

  1. Pick direction carefully

    Call checkCompatibility(dependency, project) — dependency first. Reversing the arguments answers a different legal question.

  2. Audit a dependency list

    Pass the project license plus the dependency array to checkMatrix and read each status, label, rationale, and obligations entry.

  3. Act on the status

    Ship on yes, gate on conditional (preserve notices, patent terms, covered-file source), and replace or relicense on no.

Use cases

Vetting a new dependency

Check a GPL-2.0 or AGPL-3.0 library against a MIT or Apache-2.0 codebase before adding it to package.json.

Explaining a denial

Paste the non-empty rationale and obligations into a review to show why a combination is blocked.

Planning relicensing

Run checkMatrix across candidate project licenses to see which one turns every dependency green.

Common mistakes

Mistake:Assuming compatibility is symmetric.

Fix:It is one-way: MIT in AGPL-3.0 is yes but AGPL-3.0 in MIT is no. Always put the dependency first and the project second.

Mistake:Treating conditional as a free pass.

Fix:Conditional (e.g. MPL-2.0 in MIT) still requires covered-file licensing, source supply, and notice retention — read obligations before shipping.

Frequently asked questions

What does this tool do?

It answers the one-way question checkCompatibility(dependency, project) across 15 licenses with yes/conditional/no status, Permitted/Conditional/Not compatible labels, rationale sentences, and obligation lists — plus checkMatrix for whole dependency arrays and getLicenseInfo for families and duties.

Can I mix Apache-2.0, GPL-2.0, and MIT code?

An Apache-2.0 library in a GPL-3.0 project is yes (patent terms compatible); a GPL-2.0 library in an Apache-2.0 project is no (combined work must stay GPL-2.0); an MIT library is yes in every project including GPL-2.0, GPL-3.0, and AGPL-3.0. Every denial carries a non-empty rationale naming the conflict.

Is my dependency list uploaded or stored?

No. The one-way rule table and matrix mapping run entirely in your browser — licenses never leave your device.

How do I handle conditional results?

Treat conditional (e.g. MPL-2.0 in MIT) as gated: keep covered files under their license, supply source and notices per obligations, and only ship the combination once those duties are met.

References & standards