Open source license usage on GitHub.com
Open source simply isn’t open source without a proper license. Unless you’ve explicitly told others that they can modify and reuse your work, you’ve only showed others your code; you…

Open source simply isn’t open source without a proper license. Unless you’ve explicitly told others that they can modify and reuse your work, you’ve only showed others your code; you haven’t shared it. Here at GitHub, we’re big fans of open source, so we set out to better understand how our users approached licensing their code by looking at license usage across public, non-forked repositories, in hopes of encouraging more users to share their work with others.
If you look at this graph of licensed repositories over time, you’ll notice that the percentage of licensed repositories has been decreasing, hovering around 20% throughout GitHub’s history (about 30% if you include forked repositories). The sharp spike in mid-2013 represents our first pass at making open source licensing on GitHub easier by launchingchoosealicense.com to demystify license choices, and introducingthe license picker to encourage users to license their projects.
Breakdown of license usage
We also wanted to look at the relative breakdown of the most popular open source licenses. You can see their popularity expressed below as a percentage of licensed projects on GitHub.com:
Rank | License | % of projects |
---|---|---|
1 | MIT | 44.69% |
2 | Other | 15.68% |
3 | GPLv2 | 12.96% |
4 | Apache | 11.19% |
5 | GPLv3 | 8.88% |
6 | BSD 3-clause | 4.53% |
7 | Unlicense | 1.87% |
8 | BSD 2-clause | 1.70% |
9 | LGPLv3 | 1.30% |
10 | AGPLv3 | 1.05% |
Unsurprisingly, MIT, Apache, and GPL are the clear front runners, with some 15% of licensed projects opting for a non-standard license or standard license not among those listed on choosealicense.com.
Last, we looked at how license usage has changed over time. Again, you see a swift uptick of the three featured license (MIT, Apache, GPL) in mid-2013, with the relative percentages remaining otherwise steady over the past six years.
Developers use GitHub because they want to share their code with the world, and the data suggests that when the tools we use make it a little bit easier, developers do just that. When presented with the option, they choose to license, and they license very permissively.
Under the hood
To detect what license, if any, a project is licensed under, we used an open source Ruby gem calledLicensee to compare the repository’sLICENSE
file to a short list of known licenses. However, it’s important to note that this approach doesn’t count a project as licensed if the README indicates a specific license or if individual project files contain a named license in the code comments.
The licenses API
We want to make it easier for open source developers to license their code, and for open source consumers to verify that they are using open source projects under an appropriate license. To that end, we’re launching theLicenses API preview to retrieve information about a particular project’s license file, as well as metadata about open source licenses in general.
When you pass the appropriate preview media type, API requests for a particular repository will now include the project’s license, if any, represented by itsSPDX-compliant and human-readable names:
{ ... "license": { "key": "mit", "name": "MIT License", "url": "https://api.github.com/licenses/mit" } ...}
The individual license endpoints (e.g.,/licenses/mit
) return additional information about the license, including what you can and can’t do with the software, and the full license body. For more information, seethe developer documentation.
Share your code
If you haven’t already,we encourage you to add aLICENSE
file to your project. To make things a bit easier, if you begin to create a file namedLICENSE
via the web interface, we’ll even provide you with a list of common license templates to choose from.
This is just the start. Look forward to a more in depth analysis over the coming weeks as to how license usage affects project success, as we delve deeper into the numbers. Of course, in the mean time, we encourage you to explore license usage on GitHub usingthe Licenses API.
Happy open source licensing!
Written by
Ben Balter
Ben Balter is Chief of Staff for Security at GitHub, the world’s largest software development platform. Previously, as a Staff Technical Program manager for Enterprise and Compliance, Ben managed GitHub’s on-premises and SaaS enterprise offerings, and as the Senior Product Manager overseeing the platform’s Trust and Safety efforts, Ben shipped more than 500 features in support of community management, privacy, compliance, content moderation, product security, platform health, and open source workflows to ensure the GitHub community and platform remained safe, secure, and welcoming for all software developers. Before joining GitHub’s Product team, Ben served as GitHub’s Government Evangelist, leading the efforts to encourage more than 2,000 government organizations across 75 countries to adopt open source philosophies for code, data, and policy development.
Related posts

For the Love of Code: a summer hackathon for joyful, ridiculous, and wildly creative projects
That idea you’ve been sitting on? The domain you bought at 2AM? A silly or serious side project? This summer, we invite you to build it — for the joy, for the vibes, For the Love of Code 🧡

Git security vulnerabilities announced
Today, the Git project released new versions to address seven security vulnerabilities that affect all prior versions of Git.

Highlights from Git 2.50
The open source Git project just released Git 2.50. Here is GitHub’s look at some of the most interesting features and changes introduced since last time.
Explore more from GitHub
GitHub
Build what’s next on GitHub, the place for anyone from anywhere to build anything.
GitHub Universe 2025
Last chance: Save $700 on your IRL pass to Universe and join us on Oct. 28-29 in San Francisco.
We do newsletters, too
Discover tips, technical guides, and best practices in our biweekly newsletter just for devs.