An open-source license generator that uses the official texts
Choosing a licence is the step many repositories skip, and without one the default in most countries is “all rights reserved”: nobody else may legally use or change your code. This open-source license generator lets you pick MIT, Apache 2.0, GPL 3.0, LGPL 3.0, AGPL 3.0, MPL 2.0, BSD 2-Clause, BSD 3-Clause, ISC or the Unlicense and hands you the finished LICENSE file in one click.
The text is not a paraphrase. Every licence is the exact wording published in the SPDX License List data (spdx/license-list-data, release v3.29.0, September 2026). The only edits are the ones the licences themselves ask for: the <year> and <copyright holders> placeholders in MIT, BSD and ISC. The GPL family, Apache and MPL texts are left untouched, which is what their authors require. Everything runs in your browser; nothing you type is sent anywhere.
How to use the Open-Source License Generator
- Choose a licence from the list. The one-line summary and the comparison table below it show how it differs from the others.
- Type the year (or a range such as
2021-2026) and the copyright holder, usually your name or your company. - Check the preview. Press Copy text or Download LICENSE; the file is named
LICENSEwith no extension. - Commit the file to the root of your repository so that code hosts can recognise the licence.
- Copy the source-file notice into file headers if you want each file to carry its licence, and use the SPDX identifier in
package.json,pyproject.tomlorCargo.toml.
Open-Source License Generator features
Exact SPDX texts
Ten licences reproduced word for word from the SPDX License List data, so license scanners and lawyers see the standard text.
Placeholders filled, nothing else
Year and holder replace only the placeholders in the text. A warning appears while a field is empty so you do not ship “<year>” by accident.
Source-file notices
The short header each licence recommends, with your year and name filled in, plus an SPDX-License-Identifier line.
Or-later option
For GPL, LGPL and AGPL, switch the notice and identifier between “only” and “or later”.
Plain-language comparison
A table of copyleft, patent grant, closed-source use and network clauses, so you can compare before you decide.
MIT, Apache or GPL: how to choose
The licences fall into three families. This is a guide to the trade-offs, not a recommendation for your project.
- Permissive (MIT, BSD, ISC, Apache 2.0): others may use your code in closed products if they keep your notice. Apache 2.0 adds an explicit patent licence, which large companies often prefer.
- Weak copyleft (MPL 2.0, LGPL 3.0): changes to your files, or to the library itself, must be shared, but programs that merely use it need not be.
- Strong copyleft (GPL 3.0, AGPL 3.0): works built on your code must be released under the same licence when distributed; the AGPL extends this to software offered as a network service.
- Public domain (Unlicense): no conditions at all. Because public-domain dedication does not work the same way in every country, the text includes a fallback permission.
How the licence texts are handled
Only MIT, BSD 2-Clause, BSD 3-Clause and ISC contain a copyright line to complete. Apache 2.0 keeps its “[yyyy] [name of copyright owner]” boilerplate inside an appendix that explains how to apply it, so the full text is shipped unchanged and your name goes in the notice. The GNU texts are unchanged too; the FSF asks that licence texts are copied verbatim. The SPDX text of the LGPL 3.0 also contains the GPL 3.0 text it incorporates, so it is longer than the file you may know.
| Licence | Placeholders in the text | Where your name goes |
|---|---|---|
| MIT, BSD 2/3, ISC | year, holder | The copyright line of the LICENSE file |
| Apache 2.0 | none in the main text | Source-file notice, NOTICE file |
| GPL, LGPL, AGPL | none in the main text | Source-file notice |
| MPL 2.0, Unlicense | none | Not needed in the licence text |
Sources and limits
Texts come from SPDX License List data release v3.29.0 (16 September 2026), file json/details/<id>.json, field licenseText, published at github.com/spdx/license-list-data. The repository does not carry a licence file of its own, so this page presents the texts as the licences’ published wording. Use your own judgement for dual licensing, contributor agreements or relicensing existing code. This tool provides general information, not legal advice, and a lawyer should review anything commercial.
Open-Source License Generator FAQ
Which license generator output should I use for a GitHub project?
Save it as LICENSE (or LICENSE.md) in the repository root. MIT is the simplest choice for libraries, Apache 2.0 adds a patent grant, and GPL or AGPL are used when you want improvements shared back.
Is the MIT license text here the official one?
Yes. It is the SPDX text of the MIT License, with only the year and copyright holder filled in.
Do I have to put my name in the license?
For MIT, BSD and ISC the copyright line names the holder, which can be you or your employer if the employer owns the work. Apache, GPL and MPL texts stay unchanged.
What year should I use?
The year of first publication, or a range such as 2021-2026 if the project has been updated since. It is a notice, not a registration.
Can I change the license later?
You can license new versions differently, but versions already released stay available under the old terms, and code from other contributors needs their agreement.
Is this legal advice?
No. It is general information to help you pick and apply a standard licence. Ask a qualified lawyer for advice on your situation.