Pick the right license for your project, generate the LICENSE file, and copy it straight into your repo. 10 licenses compared.
Simple and permissive. Do anything, just include the license.
Permissive with patent protection. Great for enterprise.
Strong copyleft. Derivatives must also be open source.
Like MIT but with a non-endorsement clause.
Simplified BSD. Minimal restrictions.
Functionally identical to MIT. Simpler language.
File-level copyleft. Modified files must stay open.
Copyleft for libraries. Linking is allowed.
Strongest copyleft. Network use triggers sharing.
Public domain. No restrictions whatsoever.
| License | Commercial Use | Modification | Distribution | Patent Grant | Copyleft |
|---|---|---|---|---|---|
| MIT | ✓ | ✓ | ✓ | — | No |
| Apache 2.0 | ✓ | ✓ | ✓ | ✓ | No |
| GPL 3.0 | ✓ | ✓ | ✓ | ✓ | Strong |
| BSD 3-Clause | ✓ | ✓ | ✓ | — | No |
| ISC | ✓ | ✓ | ✓ | — | No |
| MPL 2.0 | ✓ | ✓ | ✓ | ✓ | File-level |
| LGPL 3.0 | ✓ | ✓ | ✓ | ✓ | Library |
| AGPL 3.0 | ✓ | ✓ | ✓ | ✓ | Network |
| Unlicense | ✓ | ✓ | ✓ | — | No |
Choosing the right license is one of the most important decisions for any open source project. The wrong license can limit adoption, scare away contributors, or create legal headaches down the road.
If you want your code used everywhere — including commercial products — MIT and ISC are the go-to choices. They're simple, well-understood, and impose minimal restrictions. Most npm packages, React libraries, and developer tools use MIT.
Apache 2.0 is like MIT but includes an explicit patent grant. If your project could involve patentable technology, Apache 2.0 protects both you and your users. Used by Kubernetes, TensorFlow, and Android.
The GPL requires anyone who distributes modified versions of your code to also release their changes under GPL. This is "copyleft" — it keeps the entire ecosystem open. Used by Linux, WordPress, and Git.
If you're building a library that others will link against, LGPL and MPL offer a middle ground: your library stays open, but apps that simply use it don't have to be open source.
The Unlicense dedicates your work to the public domain. Anyone can do anything with it. No attribution required. Use this for utilities, snippets, and code you want to share freely.
Use MIT for maximum permissiveness and simplicity. Choose Apache 2.0 if you need patent protection. Pick GPL if you want all derivatives to stay open source. The generator explains each license's key requirements before you choose.
MIT is the most popular open source license. It allows anyone to use, copy, modify, and distribute your code with minimal restrictions — users only need to keep the original copyright notice. It's ideal for libraries and tools you want widely adopted.
Both are permissive, but Apache 2.0 adds an explicit patent grant protecting users from patent claims by contributors. Apache 2.0 also requires documenting changes. MIT is simpler and shorter — most developers default to MIT unless patent protection is needed.
Yes. Without a license, your code is "all rights reserved" by default and others cannot legally use, modify, or distribute it. A license explicitly grants permissions and protects both you and contributors.
Generate the license with your year and name filled in, then create a file called LICENSE or LICENSE.md in your repository root. GitHub auto-detects and displays the license type on your repo page.
Get the complete system to hire an AI agent as your first employee. Setup guides, 30 delegation templates, security hardening.