Informational only. Not legal advice. Read more.

» Guide

SPDX identifiers

Short, machine-readable license identifiers. Use them in your source files.

SPDX is the Software Package Data Exchange — an open standard for communicating software bill-of-materials information, including licenses. Its most visible piece is the SPDX License List: a registry of short, unique identifiers for each license.

Examples:

  • MIT
  • Apache-2.0
  • GPL-3.0-only (or GPL-3.0-or-later)
  • BSD-3-Clause
  • CC-BY-4.0

SPDX identifiers in source files

Add a one-line header to the top of every source file:

// SPDX-License-Identifier: MIT

Tools including REUSE, licensee, and GitHub’s license detection understand these identifiers and will correctly attribute the file.

Expressions

SPDX can express more complex licensing with boolean operators:

  • Apache-2.0 OR MIT — dual-licensed, user may pick.
  • Apache-2.0 AND LGPL-3.0-or-later — both licenses apply simultaneously.
  • GPL-2.0-only WITH Classpath-exception-2.0 — plus a named exception.

Why it matters

If your file has an SPDX header, compliance tooling can audit a large codebase in seconds. Without one, compliance requires manual reading. Small habit, large downstream benefit.

SPDX-listed licenses on this site

Most licenses on yourlicense.ca are SPDX-listed. Proprietary templates (all-rights-reserved, generic-eula) are not, because they are not single named licenses — they are starting points.

Notice

Informational only

Nothing on yourlicense.ca is legal advice. Confirm with a lawyer before you license anything that matters.

Read the disclaimer →