License Generator
Generate open source license files in your browser. Choose from MIT, Apache 2.0, GPL 3.0, BSD, ISC, MPL, LGPL, AGPL, and the Unlicense, fill in your name and year, then copy or download the finished LICENSE file.
Why Every Project Needs a License
Without a license, your code is under exclusive copyright by default. Nobody can legally copy, modify, or redistribute it, even if the repository is public. Adding an open source license solves this by explicitly granting permissions and attaching conditions. It tells collaborators, employers, and other projects exactly what they are allowed to do with your work.
This generator produces a ready to use LICENSE file for ten of the most common open source licenses. Choose a license, enter the copyright holder and year, and the full text is generated in your browser with the placeholders already filled in.
How to Choose a License
Licenses fall into a few broad families. The right pick depends on how much freedom you want to give others and how much openness you need back.
- Permissive: MIT, ISC, and the BSD licenses let anyone use your code for anything, including closed source products, as long as they keep your copyright notice. These are the most popular choices for libraries and small projects because they impose almost no obligations.
- Patent aware permissive: Apache 2.0 is permissive like MIT but adds an explicit patent grant from contributors and a trademark protection clause. Many larger companies prefer it for that reason.
- Strong copyleft: GPL 3.0 requires that derivative works are distributed under the same license with source code available. AGPL 3.0 extends this to software offered over a network, which is common for hosted services.
- Weak copyleft: LGPL 3.0 is designed for libraries. Code that links to the library can stay under other terms, but changes to the library itself remain open. MPL 2.0 applies copyleft at the file level instead of the whole project.
- Public domain: the Unlicense dedicates the work to the public domain with no conditions at all.
If you only want one recommendation: MIT or Apache 2.0 for maximum adoption, GPL 3.0 or AGPL 3.0 if you want derivative works and hosted services to stay open, and MPL 2.0 for a middle ground on larger projects.
What the Generator Fills In
Most licenses contain placeholder text where the copyright line belongs. The generator replaces every placeholder with the full name and year you provide:
- MIT uses
<year> <copyright holders>in the copyright line. - BSD 2-Clause and 3-Clause use
<year> <owner>. - Apache 2.0 uses
[yyyy] [name of copyright owner]in its appendix. - GPL 3.0, AGPL 3.0, and LGPL 3.0 use
<year> <name of author>in the copyright notice. - MPL 2.0 and the Unlicense are generic and need no placeholders.
If you leave the name empty, the generator inserts a neutral "The Author" so the text stays readable. You can always edit the output before shipping it.
Where to Put the LICENSE File
Save the generated text as a file named LICENSE with no extension at the root of your repository. GitHub, GitLab, and most package registries detect that filename automatically and display the license on your project page. Some ecosystems use a different convention: npm packages can use the license field in package.json, and R packages use a LICENSE file with a slightly different layout. When in doubt, the plain LICENSE file at the repository root is the safest choice.
You should also mention the license in your README, and if you are publishing a package, add the SPDX identifier (for example MIT or Apache-2.0) to your package manifest so tools can read it automatically.
Can I Change the License Later?
As the copyright holder you can change the license for future releases, but you cannot revoke the permissions already granted for older versions. Anyone who obtained the code under the original license keeps those rights. This is also why projects sometimes require contributors to sign a contributor license agreement before merging changes, so the project keeps the flexibility to relicense.
Privacy
The generator runs entirely in your browser. The license texts come from a bundled SPDX license list, and your name and year are only used locally to fill in the placeholders. Nothing is uploaded, stored, or logged, so you can generate license files for private or unreleased projects without any exposure.
Frequently Asked Questions
Which license should I choose for a new project?
For most small projects and libraries, MIT or Apache 2.0 gives the widest adoption because they are permissive. Choose Apache 2.0 if you want an explicit patent grant. Choose GPL 3.0 or AGPL 3.0 if you want derivative works and network services to remain open source.
Do I need to register or pay for an open source license?
No. Open source licenses are free to use. You simply include the license text in your repository and keep the copyright notice. There is no registration process.
What is the difference between MIT and ISC?
They are functionally equivalent permissive licenses. The ISC license is shorter and simpler, while MIT is more widely recognized. Either one lets others use your code freely with attribution.
Can I use the same license for multiple projects?
Yes. Licenses are not limited to one project. You just need to include the copyright line with the correct year and holder in each repository.
Does the GPL require me to publish my website's source code?
The plain GPL 3.0 triggers when you distribute the software. If you only run the code on your own servers, the GPL does not require you to publish anything. The AGPL 3.0 closes that gap for network services.
Is the generated text legally accurate?
The texts are the standard license texts from the SPDX license list, with placeholders filled in. The generator does not provide legal advice; for complex commercial situations, have a lawyer review your licensing strategy.
Related Tools
Related Tools
Recent Visits
Finance Calc Kit
Focused calculators on Finance Calc Kit for loans, compounding investments, contractor tax estimates, and reti...
Explore Finance Calc Kit