// SPDX-License-Identifier: Apache-2.0

Use SPDX short-form identifiers to communicate FOSS license information
in a simple, efficient, portable and machine-readable manner


What are SPDX IDs?

  • An easy way to label your source code's licenses
  • Needs only one new comment line per file
  • Human-readable and machine readable


Why use SPDX IDs?

  • Determine easily which licenses apply to a file
  • Standardize licenses in source code, docs and others
  • Eliminate error-prone parsing of license headers
  • Decrease confusion by using the SPDX License List

Read more about why to use SPDX identifiers


How do SPDX IDs work?

In each file in your project, just add a single line in the following format, tailored to your license(s) and the comment style for that file's language:

  • // SPDX-License-Identifier: MIT
  • /* SPDX-License-Identifier: MIT OR Apache-2.0 */
  • # SPDX-License-Identifier: GPL-2.0-or-later

Read more about how to use SPDX identifiers


Where are SPDX IDs used?

SPDX identifiers are being used in a growing number of open source projects (such as the Linux kernel), licensing guidelines (such as the FSFE's REUSE Software initiative), and license scanning tools.

See SPDX identifiers in the wild