Compare Open Source Licenses

MIT vs Apache 2.0 vs GPL v3 vs BSD vs AGPL — detailed comparison table to help you choose the right license

Full Comparison Table

CriteriaMITApache 2.0GPL v3LGPLBSD 3AGPLMPL 2.0
Commercial use
Closed source code✅*✅**
Modify code
Attribution required
Patent protection
Copyleft🔴 Strong🟡 Weak🔴 + Network🟡 File
Sublicense
License text length📗 Short📙 Medium📕 Long📕 Long📗 Short📕 Long📙 Medium

* LGPL allows closed source if the library is dynamically linked ** MPL 2.0 allows closed source for files not covered by MPL


License Descriptions

MIT — The Permissive Standard

The simplest and most permissive license. One condition: keep the copyright notice. Best for: libraries, tools, anything you want maximum adoption for.

Apache 2.0 — MIT + Patent Protection

Like MIT, but adds explicit patent grant from contributors. Best for: corporate-friendly projects, when patent protection matters.

GPL v3 — Strong Copyleft

If you distribute GPL software, you must release your source code under GPL. Best for: when you want to ensure derivative works remain open-source.

LGPL — Weak Copyleft

Like GPL but allows dynamic linking from proprietary code without copyleft requirement. Best for: libraries that want to be usable in proprietary apps.

BSD 3-Clause — MIT + Non-Endorsement

Adds clause: you can’t use the project’s name to endorse your product. Best for: projects coming from universities or foundations.

AGPL — GPL + Network Use

Closes the “SaaS loophole” of GPL: if you run AGPL software as a service, you must release source. Best for: web applications you want to keep open-source.

MPL 2.0 — File-Level Copyleft

Copyleft applies per-file: MPL files stay open, your own files can be proprietary. Best for: when you want file-level copyleft without full GPL obligations.


How to Choose — Decision Tree

Do you want to allow use in proprietary/closed-source products?
├── YES → Do you need patent protection?
│         ├── YES → Apache 2.0
│         └── NO  → Is simplicity important?
│                   ├── YES → MIT
│                   └── NO  → BSD 3-Clause
└── NO  → Is it a server-side app (SaaS)?
          ├── YES → AGPL
          └── NO  → Is it a library?
                    ├── YES → LGPL
                    └── NO  → GPL v3

MIT vs Apache 2.0 — When to choose which?

Choose MIT if…Choose Apache 2.0 if…
You want maximum simplicityPatent protection matters
Building a small libraryEnterprise/corporate environment
Contributors are individualsContributors may hold patents
You don’t worry about patentsYou want formal patent grant language

Compatibility with MIT

Can MIT code be combined with other licenses?

LicenseCan use MIT code?Notes
Apache 2.0✅ YesResult is Apache 2.0
GPL v3✅ YesResult is GPL v3
GPL v2✅ YesResult is GPL v2
BSD✅ YesCompatible
AGPL✅ YesResult is AGPL
Proprietary✅ YesJust keep the LICENSE

MIT is one of the most compatible licenses — it can be combined with virtually any other license.