Open-source licence generator — MIT, Apache 2.0, GPL and more

Pick a licence, type the year and the copyright holder, and the tool gives you the licence text to save as LICENSE, or the official notice plus a link to the full text for the long licences.

Live demo · real result from this tool

LICENSE

MIT License Copyright (c) 2026 Asha Rao Permission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in allcopies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, 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 THESOFTWARE.

MIT License (SPDX: MIT). Put this file at the repository root and set "license": "MIT" in package.json.

Processed on your device — nothing is uploaded.

How to use the licence generator

  1. Choose a Licence: MIT License, ISC License, BSD 2-Clause, BSD 3-Clause, The Unlicense, Apache License 2.0, Mozilla Public License 2.0 or GNU General Public License v3.0.
  2. Check the Year and type the Copyright holder.
  3. For GPL 3.0, also fill in Program name and one-line description (GPL notice).
  4. Copy the output. For the short licences, save it as LICENSE in the root of your repository. For the long ones, follow the note under the output.

What it does and when to use it

A public repository without a licence is not open source: by default nobody may copy or change the code. A LICENSE file fixes that, and GitHub and package registries read it. Use this tool when you start a repository, publish a package, or find an old project without a licence. The README generator links the licence from your README, and the package.json generator takes the same SPDX id. Record later licence changes in your changelog.

How it works

The tool holds two kinds of templates, filled in your browser:

  • Full texts for MIT, ISC, BSD 2-Clause, BSD 3-Clause and the Unlicense, from the SPDX licence list, with the year and holder in the copyright line. A note gives the SPDX id for package.json.
  • Notices for Apache 2.0, MPL 2.0 and GPL 3.0: the short text each licence tells you to put at the top of source files or in your README, plus a link to the official full text.

To compare licences side by side, choosealicense.com and the SPDX licence list are good references.

Worked examples

MIT with the default values. Year 2026, holder Asha Rao. The file starts like this and continues with the standard permission and warranty paragraphs:

MIT License

Copyright (c) 2026 Asha Rao

Apache 2.0 for a company. Holder Northwind Labs. The output is the Apache appendix notice, which begins Copyright 2026 Northwind Labs and then Licensed under the Apache License, Version 2.0. Save the full licence from the linked URL as LICENSE.

GPL 3.0 for a small tool. Year 2025, holder Lena Park, program line tidy-csv — cleans messy CSV exports. The notice opens with the program line, then Copyright (C) 2025 Lena Park (GPL’s own two-space layout).

Limits and tips

  • Do not edit the licence wording. Only the copyright line should change; a modified licence is no longer the standard one.
  • Check the holder. Code written for an employer is often owned by the employer, not by you.
  • Third-party code keeps its own licence. Your LICENSE covers your code, not copied libraries.

Frequently asked questions

Which licence should I choose?
MIT and ISC let anyone reuse your code with almost no conditions. Apache 2.0 is also permissive and adds a patent grant. GPL 3.0 requires anyone who distributes a changed version to share its source under the same licence; MPL 2.0 does this per file. This is not legal advice.
Why do Apache 2.0, MPL 2.0 and GPL 3.0 not give me the full text?
They are several pages long, and copying them by hand risks errors. The tool gives each licence's own "how to apply" notice and the official link; save the full text from that link unchanged as LICENSE.
What should the copyright holder be?
The person or organisation that owns the code. Left blank, the text says "<copyright holder>" so you can spot it.
Do I need to change the year every January?
No. Many projects keep the first year of publication or use a range such as 2024-2026. A blank field fills in the current year.
What is the SPDX identifier for?
A short standard name such as MIT or Apache-2.0. Put it in the "license" field of package.json so tools can read it.

Written by the ToolsRift team · Last updated

Pages are drafted with AI assistance and checked by automated tests. How we write and check pages.

Was this tool useful?

Report a problem

Start typing to search every tool.

↑ ↓ to moveEnter to openEsc to close