Full Comparison Table
| Criteria | MIT | Apache 2.0 | GPL v3 | LGPL | BSD 3 | AGPL | MPL 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 simplicity | Patent protection matters |
| Building a small library | Enterprise/corporate environment |
| Contributors are individuals | Contributors may hold patents |
| You don’t worry about patents | You want formal patent grant language |
Compatibility with MIT
Can MIT code be combined with other licenses?
| License | Can use MIT code? | Notes |
|---|---|---|
| Apache 2.0 | ✅ Yes | Result is Apache 2.0 |
| GPL v3 | ✅ Yes | Result is GPL v3 |
| GPL v2 | ✅ Yes | Result is GPL v2 |
| BSD | ✅ Yes | Compatible |
| AGPL | ✅ Yes | Result is AGPL |
| Proprietary | ✅ Yes | Just keep the LICENSE |
MIT is one of the most compatible licenses — it can be combined with virtually any other license.