License Generator
Generate a LICENSE file for MIT, Apache, GPL, BSD, ISC or Unlicense.
Overview
Pick a license (MIT, Apache 2.0, GPLv3, BSD-2/3-Clause, ISC, or Unlicense), enter your name and year, and the generator produces a copy-ready LICENSE file with the right copyright notice substituted in. The text is the canonical SPDX version - no custom modifications, so license scanners recognise it.
It's for developers and maintainers who need to drop a LICENSE file into a new repo and want to be sure they're using the official wording. Reach for it when starting a new open-source project, vendoring code into a private repo, or fixing a license that was accidentally tweaked over time.
How it works
License templates are the canonical full text published by their authors and indexed by SPDX (the Software Package Data Exchange identifier registry that GitHub, NPM, and pretty much every package registry use to declare license metadata). Only the copyright line is substituted - the body of the license remains byte-identical to the SPDX entry, which is what scanners look for.
The Unlicense and CC0 variants don't include a copyright line but are emitted as-is for clarity.
Examples
- MIT LICENSE (first few lines):
MIT License Copyright (c) 2026 Alex Morgan Permission is hereby granted, free of charge, to any person obtaining a copy... - Apache 2.0 starts with a long preamble:
Apache License Version 2.0, January 2004 ... Copyright 2026 Alex Morgan - GPLv3 prepends the standard notice; the full license body follows.
- BSD-3-Clause:
Copyright (c) 2026, Alex Morgan All rights reserved. Redistribution and use in source and binary forms...
FAQ
Which license should I choose?
Permissive (MIT, Apache 2.0) for libraries you want widely adopted. Copyleft (GPL, AGPL) when you want derivatives to remain open. Apache 2.0 adds an explicit patent grant - useful if patents are a concern.
What goes in <author>?
Your legal name or organisation. For multiple authors, list them comma-separated or use a "Contributors" notice and a separate AUTHORS file.
Where does the LICENSE file go?
At the repo root, named LICENSE or LICENSE.md (GitHub recognises both for detection). Some communities prefer COPYING for GPL projects.
Should I add an SPDX header to source files?
It's a great practice. Add // SPDX-License-Identifier: MIT at the top of each source file - tools like REUSE and license scanners pick it up automatically.