How to use SPDX
- 1. Pick an SPDX license identifier. Click a row in the table or use the dropdown — MIT, Apache-2.0, GPL-3.0-only, and others.
- 2. Set year and copyright holder. Inserted into the copyright line of the LICENSE stub.
- 3. Copy LICENSE or SPDX line. MIT, Apache-2.0, and Unlicense include a short body; GPL and BSD emit SPDX-License-Identifier plus copyright.
- 4. Confirm against SPDX. This is not legal advice. Read the official license text before you publish.
About this tool
An SPDX license identifier is the short string machines and humans use to name an open-source license — for example MIT, Apache-2.0, or GPL-3.0-only. Package managers, GitHub, and REUSE tooling expect SPDX-License-Identifier in package.json, Cargo.toml, or file headers. This page lists the most common identifiers and generates a LICENSE stub with your year and copyright holder. Nothing is uploaded.
Common SPDX license identifiers
MIT and Apache-2.0 are the default choices for permissive open source. BSD-2-Clause and BSD-3-Clause are common in systems software. GPL-3.0-only and LGPL-3.0-only are copyleft. MPL-2.0 is a weak copyleft middle ground. ISC is MIT-like. Unlicense and CC0-1.0 waive rights to different degrees. The table in the tool shows each id, its full name, and whether this generator emits a full LICENSE body or only an SPDX-License-Identifier line.
SPDX-License-Identifier in files
Add a one-line header in each source file when your project follows REUSE or your company policy: SPDX-License-Identifier: MIT. Keep the full LICENSE file at the repo root. Do not mix incompatible identifiers in one file.
Full text vs identifier-only
GPL, LGPL, MPL, BSD, ISC, and CC0 stubs here are identifier plus copyright — fetch the complete license from spdx.org if you need every clause. MIT, Apache-2.0, and Unlicense include a shortened body suitable for quick starts; still verify before release.
Code examples
File header
SPDX-License-Identifier: MITpackage.json
{
"name": "my-lib",
"version": "1.0.0",
"license": "MIT"
}