Comparing the major open-source licenses
Open-source licenses fall on a spectrum from permissive (do almost anything, just keep the notice) to strong copyleft (derivatives must stay open under the same terms). Choosing or complying with one comes down to three questions: can you use it in proprietary code, does it grant patents, and what must you disclose when you distribute. This reference compares the licenses you will meet most often.
How it works
Each license sets conditions that attach when you distribute (and, for AGPL, when you serve over a network). Permissive licenses — MIT, BSD, Apache 2.0 — only ask you to preserve the copyright and licence text; Apache 2.0 adds an express patent grant. Weak copyleft — LGPL (library linking) and MPL 2.0 (per-file) — keeps the licensed parts open while allowing proprietary combination. Strong copyleft — GPLv2, GPLv3, AGPLv3 — requires the whole derivative work to be released under the same licence, with AGPL extending that to networked use. GPLv3 and Apache 2.0 are compatible one way; GPLv2-only and Apache 2.0 are not.
Tips and notes
- For maximum adoption, pick a permissive licence — MIT or Apache 2.0.
- Prefer Apache 2.0 when you want an explicit patent grant and retaliation clause.
- AGPL triggers source disclosure for network use — important for SaaS.
- Keep the LICENSE file and copyright notices intact in every distribution.