Open source software thrives on code reuse, but each license carries conditions governing how that code may be combined and redistributed. Compatibility refers to whether a project under one license can legally incorporate code under another license and distribute the resulting work. Incompatible licenses can create legal conflicts, forcing developers to remove components or change licensing strategies. This calculator offers a simplified matrix for several common licenses to provide quick guidance. It is not a substitute for professional legal advice, but it helps developers flag potential issues early.
The compatibility database behind this tool classifies pairs of licenses into three outcomes:
The matrix focuses on situations where you distribute binaries that include the dependency’s code. Using a library merely as a separate service (e.g., via network APIs) may trigger different rules like the AGPL. Always read the full license text.
Project \ Dependency | MIT | Apache-2.0 | GPLv3 | GPLv2 | BSD-3 | LGPLv3 |
---|---|---|---|---|---|---|
MIT | ✔ | ✔ | Conditional | Conditional | ✔ | ✔ |
Apache-2.0 | ✔ | ✔ | Incompatible | Incompatible | ✔ | ✔ |
GPLv3 | Requires GPLv3 | Requires GPLv3 | ✔ | ✔ (if v2+ | Requires GPLv3 | ✔ |
GPLv2 | Requires GPLv2 | Incompatible | Incompatible | ✔ | Requires GPLv2 | Conditional |
BSD-3 | ✔ | ✔ | Conditional | Conditional | ✔ | ✔ |
LGPLv3 | ✔ | ✔ | Requires GPLv3 if linked statically | Incompatible | ✔ | ✔ |
Legend: ✔ = compatible; “Requires GPL” indicates you must relicense your project under GPL to incorporate that dependency.
Imagine your project is licensed under MIT, and you want to include an LGPLv3 library. The matrix shows compatibility, but you must allow users to replace the LGPL component, typically by providing dynamic linking. If you instead wish to include a GPLv3 library, your project must also adopt GPLv3 to comply with copyleft terms.
Another example: an Apache-2.0 project cannot include a GPLv2-only library because Apache’s patent termination clause conflicts with GPLv2, which lacks explicit patent grants. However, GPLv2+ (or LGPLv2.1+) permits relicensing under later versions, enabling compatibility if you adopt GPLv3.
License compatibility can depend on factors beyond the license text:
Does compatibility guarantee compliance? No. You must still follow attribution, notice, and source availability requirements described in each license.
What about proprietary software? Many permissive licenses like MIT or BSD are compatible with closed-source distribution, but copyleft licenses may require releasing source. Consult legal counsel for commercial use.
Is LGPLv3 compatible with MIT? Yes, but if you modify the LGPL library or statically link it, you must distribute source and allow relinking.
Why is GPLv3 incompatible with Apache-2.0 in this matrix? Actually, the Free Software Foundation considers Apache-2.0 compatible with GPLv3. However, Apache-licensed code cannot be included in GPLv2-only projects. Our matrix reflects the direction from project license to dependency; an Apache project cannot include GPLv3 code without changing its own license to GPLv3.
If the tool flags incompatibility, consider alternative libraries, seeking a dual-licensed version, or contacting the author for a commercial license. For conditional cases, weigh the implications of switching licenses or providing source code. Document the decision in your project’s README or CONTRIBUTING file to guide future contributors.
This calculator provides informational guidance only and does not constitute legal advice. Software licensing can be complex, and interpretations vary by jurisdiction. When in doubt, consult a lawyer experienced in intellectual property law.
Rate how well two partners align across communication, interests, lifestyle, and values. Get a quick compatibility percentage based on your responses.
Compare software license expenses with productivity gains to determine if commercial tools are worth it.
Discover how your sun sign pairs with another using this zodiac compatibility calculator. Learn about the elements and qualities that influence astrological relationships.