Software License Comparison Guide
The main spectrum goes from most permissive to most restrictive: Public Domain (CC0, Unlicense) - Zero restrictions Permissive (MIT, Apache, BSD) - Use anywhere, just keep attribution Weak Copyleft (MPL, LGPL) - Share back changes to the licensed code only Strong Copyleft (GPL, AGPL) - Everything that uses this code must also be open source For most projects, you'll want either: MIT - If you want maximum adoption and simplicity Apache 2.0 - If you want maximum adoption with better legal protections GPL-3.0 - If you want to ensure derivative works stay open source AGPL-3.0 - If you want to prevent companies from making proprietary cloud services with your code
🟢 Permissive Licenses (Most Freedom)
MIT License
What it means: Do whatever you want, just keep the copyright notice.
- ✅ Use commercially
- ✅ Modify freely
- ✅ Distribute freely
- ✅ Use in proprietary software
- ❌ No warranty/liability protection for author
When to use: You want maximum adoption and don't care if others profit from your work without giving back.
Apache License 2.0
What it means: Like MIT, but with extra legal protections.
- ✅ Everything MIT allows
- ✅ Patent protection (contributors can't sue you over patents)
- ✅ Trademark protection
- ✅ Better legal language
When to use: You want maximum adoption but with better legal safety. Popular for enterprise software.
BSD 2-Clause "Simplified"
What it means: Almost identical to MIT.
- ✅ Same freedoms as MIT
- ✅ Slightly different wording
When to use: When you want MIT-like freedom but prefer BSD's wording.
BSD 3-Clause "New" or "Revised"
What it means: Like BSD 2-Clause + you can't use the author's name to endorse derivatives.
- ✅ Same as BSD 2-Clause
- ❌ Can't use original author's name for marketing
When to use: When you want BSD freedom but don't want others using your name/reputation.
Boost Software License 1.0
What it means: Even more permissive than MIT - no attribution required in binaries.
- ✅ Use anywhere without attribution in compiled code
- ✅ Only need attribution in source distributions
When to use: For libraries where you want zero friction for users.
🔵 Public Domain (Maximum Freedom)
Creative Commons Zero v1.0 Universal (CC0)
What it means: "I give up all rights to this code."
- ✅ Literally no restrictions
- ✅ No attribution required
When to use: You want to donate your code to humanity with zero strings attached.
The Unlicense
What it means: Same as CC0 - puts code in public domain.
- ✅ No restrictions whatsoever
When to use: Same as CC0, alternative wording for public domain dedication.
🟡 Weak Copyleft (Some Restrictions)
Mozilla Public License 2.0 (MPL-2.0)
What it means: File-level copyleft - modifications to MPL files must stay MPL.
- ✅ Can combine with proprietary code
- ✅ Can use in commercial products
- ❌ Changes to MPL-licensed files must be shared back
- ✅ Can add your own proprietary files
When to use: You want improvements to your specific code shared back, but allow commercial use.
Eclipse Public License 2.0
What it means: Similar to MPL but for modules/components.
- ✅ Can combine with proprietary code
- ❌ Changes to EPL components must be shared back
When to use: Similar to MPL, popular in Java enterprise world.
GNU Lesser General Public License v2.1 (LGPL)
What it means: Library-focused copyleft - dynamic linking is usually okay.
- ✅ Can link to LGPL libraries from proprietary software
- ❌ If you modify the LGPL library itself, must share changes
- ⚠️ Static linking can be problematic
When to use: For libraries where you want improvements shared back but allow proprietary applications.
🔴 Strong Copyleft (Most Restrictions)
GNU General Public License v2.0 (GPL-2.0)
What it means: "If you use this, your entire program must be GPL too."
- ❌ Cannot combine with proprietary code
- ❌ Entire application must be GPL if it uses GPL code
- ✅ Ensures all derivative works remain free
When to use: You want to ensure your code and anything that uses it stays free/open source forever.
GNU Affero General Public License v3.0 (AGPL)
What it means: Like GPL but covers network/web services too.
- ❌ Everything GPL restricts
- ❌ If users access your AGPL software over a network, you must provide source
- ❌ Closes the "SaaS loophole"
When to use: You want to prevent companies from using your code in proprietary web services without sharing back.
📊 Quick Decision Matrix
| Your Goal | Recommended License |
|---|---|
| Maximum adoption, don't care about giving back | MIT or Apache 2.0 |
| Want legal protections, enterprise-friendly | Apache 2.0 |
| Want improvements to your code shared back | MPL-2.0 or LGPL-2.1 |
| Want everything to stay open source forever | GPL-2.0 |
| Prevent proprietary SaaS/cloud services | AGPL-3.0 |
| Give code to humanity with zero restrictions | CC0 or Unlicense |
🚨 Key Warnings
- GPL is viral - it "infects" any code that uses it
- AGPL is even more viral - covers network services too
- Patent issues - Apache 2.0 provides better patent protection than MIT
- Mixing licenses - Be very careful about license compatibility
- Legal advice - When in doubt, consult a lawyer
💡 Most Common Choices
- MIT - Simple, widely understood, maximum adoption
- Apache 2.0 - Enterprise-friendly with patent protection
- GPL-3.0 - When you want everything to stay open source
- AGPL-3.0 - When you want to prevent proprietary cloud services