Four questions, one licence.
Answer honestly and the page names a licence with the reason attached. The full decision table is underneath, so you can disagree with the logic and pick directly.
The whole decision table
Read down the list: the first row that matches your situation wins. That is exactly what the buttons do.
| If you are… | Pick | Why |
|---|---|---|
| Evaluating code I found + Closed-source product + Yes — I want a patent grant | Apache-2.0 | You are pulling code into a closed product and want patent language. Apache-2.0 gives you an explicit patent grant and still lets the product stay closed. |
| Evaluating code I found + Closed-source product | MIT | A closed product with the least paperwork. Keep the notice and you are done. |
| Evaluating code I found + Hosted service, no binaries + Improvements must come back | AGPL-3.0 | You are serving it and you want improvements to flow back. AGPL-3.0's section 13 is the clause that reaches a service without a distribution step. |
| Evaluating code I found + Hosted service, no binaries | MIT | Internal or hosted use of permissive code triggers nothing. The notice stays in your dependency licence bundle. |
| Evaluating code I found + Improvements must come back | GPL-3.0 | You are fine with the copyleft terms, so GPL-3.0 is the strongest guarantee that your improvements stay public. |
| Evaluating code I found | MIT | MIT is the path of least resistance when you are consuming code: one notice, no downstream obligations. |
| Choosing a licence for my project + Use it anywhere, including closed products + Yes — I want a patent grant | Apache-2.0 | Maximum adoption plus a patent grant. The NOTICE and modification-marking rules are the price of the extra certainty. |
| Choosing a licence for my project + Use it anywhere, including closed products | MIT | Shortest text, no conditions beyond the notice. If you want companies to adopt it without a legal review, this is the one. |
| Choosing a licence for my project + Only the files they change stay open | MPL-2.0 | File-level copyleft. Your project can be combined with closed code, but whoever edits your files must publish those edits. |
| Choosing a licence for my project + Improvements must come back + Closed-source product | LGPL-3.0 | Closed applications may link it, and improvements to the library itself still come back. Relinking has to stay possible. |
| Choosing a licence for my project + Improvements must come back + Hosted service, no binaries | AGPL-3.0 | The network clause is the point: a competitor cannot run your code as a service without publishing their changes. |
| Choosing a licence for my project + Improvements must come back | GPL-3.0 | Strong copyleft with patent language and Apache-2.0 compatibility. |
What this cannot decide for you
Whether your organisation permits copyleft at all, whether an existing dependency already forces a licence, and what your customers' procurement forms accept. Those are constraints, not preferences — check them before the licence text.
Questions
What if two licences score the same?
The more specific rule wins, which is why the table is ordered. If your situation is genuinely between two rows, the difference is usually the disclosure clause — compare them directly.
Can I change the licence later?
You can relicense your own code at any release, but you cannot take back rights already granted: the old release stays under the old licence forever.