Users Pricing

articles

Home Articles MIT, Apache or GPL? Open Source Licences in Plain English – MindStick
MIT, Apache or GPL? Open Source Licences in Plain English

MIT, Apache or GPL? Open Source Licences in Plain English

Pooja Yadav 168 24 Nov 2026

Almost every modern application is built on open source. A typical web app pulls in hundreds of packages through npm, NuGet or pip. Each of those packages comes with a licence, and each licence is a legal agreement about what you’re allowed to do with the code.

Most of the time, nothing goes wrong. But if you build commercial software, especially software you sell or deliver to clients, it’s worth knowing the difference between the licences you’re accepting.

This article is general information, not legal advice. For important commercial decisions, speak to a lawyer who knows software licensing.

Two families: permissive and copyleft

Open source licences fall into two broad groups.

Permissive licences let you do almost anything with the code, including using it in closed-source commercial products, as long as you keep the copyright notice and licence text.

Copyleft licences let you use, change and share the code, but if you distribute software built on it, you must make your source code available under the same licence. The aim is to keep improvements open.

The permissive licences

MIT

The most popular open source licence and the shortest. You can use, copy, modify, merge, publish, distribute, sublicense and sell the software. Your only real obligation: include the original copyright and licence notice. There’s no warranty.

Examples: React, .NET (runtime and SDK), Rails, jQuery and countless npm packages.

Apache License 2.0

Similar freedoms to MIT, with two important additions:

  • An explicit patent grant. Contributors grant you a licence to any patents covering their contributions. If you sue someone claiming the software infringes your patent, you lose that licence.
  • A NOTICE file requirement. If the project includes a NOTICE file, you must include it when you distribute, and you must state significant changes you made.

Many companies prefer Apache 2.0 because the patent clause gives more legal certainty. Examples: Kubernetes, Android (most of it), TensorFlow, Apache projects.

BSD (2-clause and 3-clause)

Very close to MIT. The 3-clause version adds that you can’t use the project’s or contributors’ names to endorse your product without permission.

The copyleft licences

GPL (GNU General Public License)

The best-known copyleft licence, used by Linux, WordPress and many others. The key rule: if you distribute software that includes or is derived from GPL code, the whole program must be released under the GPL, with source code available to the people you distribute it to.

Important nuances:

  • Using GPL software internally without distributing it doesn’t trigger the obligation to share your code.
  • Running GPL software on a server that users access over the network also generally doesn’t count as distribution under the GPL.
  • What counts as a “derived work”, for example when linking libraries, is a frequently debated area. If your product closely combines with GPL code, get advice.

GPLv2 and GPLv3 differ in details; GPLv3 adds patent provisions and rules against locking down devices so modified software can’t be installed.

LGPL (Lesser GPL)

A softer copyleft designed for libraries. You can use an LGPL library in a closed-source application, typically by linking to it dynamically, without releasing your own code. If you modify the library itself, you must share those changes.

AGPL (Affero GPL)

The GPL with one big addition that matters for SaaS businesses: if users interact with the software over a network, you must offer them the source code, including your modifications. It closes the “server loophole”.

If you build a SaaS product and include AGPL code, your obligations can extend to your own code. Many companies have policies that ban or strictly review AGPL dependencies for this reason.

MPL (Mozilla Public License 2.0)

A “file-level” copyleft. Changes to MPL-licensed files must be shared, but you can combine those files with your own proprietary code in a larger product. A middle ground between permissive and GPL.

Quick comparison

LicenceUse in closed-source product?Must share your changes?Must share your whole app?Patent grant
MITYesNoNoNo explicit grant
BSDYesNoNoNo explicit grant
Apache 2.0YesNo (but note changes)NoYes
MPL 2.0YesYes, for modified MPL filesNoYes
LGPLYes, with conditionsYes, for the libraryUsually nov3: yes
GPLOnly if not distributedYes, when distributedYes, when distributedv3: yes
AGPLRisky for SaaSYesYes, including over a networkYes

“Source-available” isn’t open source

A growing number of well-known projects have moved away from traditional open source licences to protect their business from cloud providers reselling them. Licences like the Business Source License (BSL), Server Side Public License (SSPL) and the Elastic License let you read and often use the code, but restrict certain commercial uses, such as offering the software as a competing managed service.

Some projects have since added back an open source licence option, and community forks have appeared in several cases. The point for you: don’t assume a popular project’s licence hasn’t changed. Check the licence of the exact version you use.

No licence means no permission

Code on GitHub with no licence file isn’t free to use. By default, copyright law reserves all rights to the author. You’d need their permission. The same applies to code snippets copied from blogs or forums unless they state a licence.

AI-generated code

AI coding assistants sometimes produce code that closely resembles existing open source code. Most major providers now include filters or indemnities for business customers, but it’s sensible to review larger generated blocks and run licence scanning on your codebase.

Practical checklist for software companies

  1. Know what you depend on. Generate a software bill of materials (SBOM) and list each dependency’s licence. Tools like GitHub’s dependency graph, license-checker for npm, pip-licenses for Python, and commercial scanners automate this.
  2. Set a policy. For example: MIT, BSD, Apache and ISC are approved; MPL and LGPL need review; GPL and AGPL need sign-off; no-licence code is not allowed.
  3. Check licences in CI. Fail the build when a new dependency with a disallowed licence appears.
  4. Keep notices. Collect the required copyright and licence notices into a “third-party notices” file shipped with your product.
  5. Check client contracts. Many enterprise and government contracts require a list of open source components and their licences, and some forbid copyleft.
  6. Choose a licence for your own projects deliberately. MIT or Apache 2.0 if you want maximum adoption; GPL or AGPL if you want improvements to stay open.

Before you add the next dependency

Permissive licences like MIT, BSD and Apache 2.0 are easy to live with: keep the notices and you’re largely fine. Copyleft licences like GPL and AGPL come with real obligations once you distribute software or, with AGPL, run it as a service. Source-available licences look open but restrict commercial use.

None of this should scare you away from open source. It just needs the same attention you’d give any other contract, preferably before the dependency is woven deep into your product.


Pooja Yadav

Django Developer at Infosys

I am a Django Developer at Infosys, Mumbai, with 5 years of experience in Django web applications and REST APIs. I completed my B.Tech in Information Technology from Graphic Era University, Dehradun. I am originally from Dehradun, Uttarakhand. Outside work I enjoy playing badminton and trekking.


Markdown for AI

A clean, structured version of this page for AI assistants and LLMs.

Open .md