Open Source License Generator
Pick MIT, Apache 2.0, GPL v3, BSD, ISC, MPL 2.0, Unlicense or CC0. Get the full LICENSE file to copy or download.
A short permissive license. Anyone can use, change and sell the code as long as the copyright notice and license text stay with it.
No name entered. The LICENSE file shows [copyright holder] until you add one.
4 digits, or a range like 2019-2026.
MIT License Copyright (c) [year] [copyright holder] Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Standard text; compare with spdx.org/licenses/MIT.html. This tool reproduces license texts and is not legal advice.
01 · Definition
What is an open source license?
An open source license is the text that tells other people what they may do with your code: use it, change it and redistribute it, and on what conditions. Without one, the code is under exclusive copyright by default and nobody else has permission to reuse it. The license normally sits in a file named LICENSE at the repository root.
02 · Overview
How the Open Source License Generator works
Generate a LICENSE file for an open-source project. MIT, BSD 2-Clause, BSD 3-Clause and ISC are filled in with your name and year. Apache 2.0, GPL v3, MPL 2.0 and CC0 are the full texts as published by Apache, the FSF, Mozilla and Creative Commons, unedited, with the source-file notice each license recommends shown separately. The file downloads as LICENSE with no extension. This tool reproduces license texts and is not legal advice.
03 · Guide
Open source licenses compared
All nine licenses here allow commercial use, modification, distribution and private use, and all disclaim warranty and liability. They differ in what they require in return and in whether they grant patent rights. The conditions and patent columns summarise the license metadata published by choosealicense.com; the line counts are of the LICENSE files this tool produces.
BSD 3-Clause adds a clause that the authors' names may not be used to endorse derived products. This is a summary for orientation, not legal advice: read the license text before relying on it.
| License | Conditions | Patent grant | Lines |
|---|---|---|---|
| MIT | Keep the copyright and license notice | Not mentioned | 21 |
| ISC | Keep the copyright and license notice | Not mentioned | 15 |
| BSD 2-Clause | Keep the copyright and license notice | Not mentioned | 24 |
| BSD 3-Clause | Keep the copyright and license notice | Not mentioned | 28 |
| Apache 2.0 | Keep notices; state changes | Yes | 202 |
| MPL 2.0 | Keep notices; disclose source; same license for modified files | Yes | 373 |
| GPL v3 | Keep notices; state changes; disclose source; same license | Yes | 674 |
| Unlicense | None | Not mentioned | 24 |
| CC0 1.0 | None | Expressly not granted | 121 |
04 · Use cases
When to use the Open Source License Generator
- 01
Add a LICENSE file to a new repository
- 02
Get the full Apache 2.0 or GPL v3 text without copying it from a web page
- 03
Get the per-file header notice for Apache 2.0, GPL v3 or MPL 2.0 with your name and year filled in
- 04
Compare what MIT, Apache 2.0 and GPL v3 each require before choosing
05 · Examples
Open Source License Generator examples
MIT, Jane Doe, 2026
ex 01MIT License Copyright (c) 2026 Jane Doe Permission is hereby granted, free of charge, to any person obtaining a copy…
The file is 21 lines. The name and year go into the copyright line; the rest is fixed.
Apache-2.0, Acme Corp, 2026
ex 02LICENSE: the 202-line Apache License, Version 2.0, unchanged. Source-file notice: Copyright 2026 Acme Corp Licensed under the Apache License, Version 2.0 (the "License")…
The license text has no name or year in it. They go in the notice the appendix tells you to add to each file.
GPL-3.0, Jane Doe, 2026
ex 03LICENSE: the 674-line GNU General Public License version 3, unchanged. Source-file notice: Copyright (C) 2026 Jane Doe This program is free software: you can redistribute it and/or modify…
The notice uses the "version 3 or any later version" wording from the license's own instructions.
CC0-1.0
ex 04Creative Commons Legal Code CC0 1.0 Universal …Statement of Purpose…
The file is 121 lines and has no fields to fill in. It is a public-domain dedication with a fallback license.
06 · FAQ
License: frequently asked questions
MIT or Apache 2.0?
Is the Apache, GPL or MPL text here complete?
What's the difference between BSD-2 and BSD-3?
When should I pick GPL?
Is Unlicense the same as CC0?
Where does the file go and what should it be called?
Do I need a license header in every source file?
Is this legal advice?
07 · Reference
Specs and further reading
These are the primary sources this tool follows. Where a specification defines the behaviour, we link the specification, not a summary of it.
- SPDX License List
Linux Foundation. The identifiers used in package metadata, with the reference text of each license. The MIT, BSD and ISC templates here follow these texts.
- Apache License, Version 2.0
Apache Software Foundation. The published text that the Apache 2.0 output reproduces byte for byte.
- GNU General Public License v3.0
Free Software Foundation. The published text that the GPL v3 output reproduces byte for byte.
- Mozilla Public License 2.0
Mozilla. The published text that the MPL 2.0 output reproduces byte for byte.
- CC0 1.0 Universal legal code
Creative Commons. The published text that the CC0 output reproduces byte for byte.
- OSI Approved Licenses
Open Source Initiative. Which licenses meet the Open Source Definition. CC0 is not on this list.
- Choose an open source license
GitHub. A plain-language comparison of the permissions and conditions of each license, and the source of the conditions and patent columns in the comparison table. Its No License page explains that unlicensed code is under exclusive copyright by default.
08 · More
Tools that pair with License
.gitignore GeneratorAI-powered
Pick from 21 stack templates or describe your project in plain English. Get a labelled, deduplicated .gitignore to copy or download.
Meta Tags GeneratorAI-powered
Generate the SEO, Open Graph and Twitter Card meta tags for a page, with a link preview. An AI model can suggest the title and description from a brief.
Lorem Ipsum Generator
Generate lorem ipsum placeholder text by paragraphs, sentences or words. Classic Latin or corporate, hipster and bacon variants. Copy or download as .txt.