Choosing an open-source license
Code without a license is not open source. By default, copyright law gives the author all rights, so others may look at public code but not legally copy, change or share it. A LICENSE file in the root of a repository grants those rights on clear terms, and platforms such as GitHub and GitLab detect it and show it on the project page.
This generator writes a complete LICENSE file for eight common licenses, using the same official texts GitHub uses. For licenses with a copyright line, it fills in the year and the copyright holder.
How to use it
- Choose a license.
- Enter the year and the copyright holder: your name, your organisation, or The Project Authors.
- Read the full text in the preview.
- Download it as LICENSE, or copy it into a file of that name in the root of your project.
Example: the MIT License
MIT, 2026, Ada Lovelace
MIT License Copyright (c) 2026 Ada Lovelace Permission is hereby granted, free of charge, to any person obtaining a copy …
The MIT text is short: anyone may use the code for anything, as long as the copyright notice and license stay with it.
Permissive or copyleft
Permissive licenses, MIT, BSD, ISC and Apache-2.0, let others use your code in any project, including closed-source products, as long as they keep the notice. Apache-2.0 adds an explicit patent grant and is popular with companies for that reason. The Unlicense goes further and places the work in the public domain where the law allows.
Copyleft licenses require that changes are shared under the same terms. GPL-3.0 applies that to any program that includes your code, while MPL-2.0 is a weaker copyleft that covers only the files you wrote, so they can be combined with code under other licenses.
Where the copyright line goes
MIT, BSD and ISC start with a copyright line, which the generator fills in. Apache-2.0, MPL-2.0 and GPL-3.0 do not: the license file is the unmodified license text, and your copyright notice goes in a NOTICE file or at the top of each source file. Each of those texts ends with an appendix that shows the recommended source-file header.
This is not legal advice
A license is a legal document. For a personal project, picking a standard license and not changing its text is usually all you need. For company code, code with contributors who have not agreed to terms, or code that bundles third-party work under other licenses, check with someone who knows the licences involved.
Questions
Which license should I choose?
If you want maximum adoption and little friction, MIT or Apache-2.0. If you want improvements to stay open, GPL-3.0, or MPL-2.0 for a file-level middle ground.
Can I change a license later?
You can license new versions differently, but copies already released under the old license keep it. With outside contributors, you usually need their agreement.
Is the text downloaded from somewhere?
No. The official texts are bundled with the page, so nothing is fetched when you generate a file.