Choosing a License

When choosing a license to apply to your project, use an existing license instead of making up a new one. And don't just use any existing license — use one of the widely-used, well-recognized existing licenses.

Such licenses are familiar to many people already. If you use one of them, people won't feel they have to read the legalese in order to use your code, because they'll have already done so for that license a long time ago. Thus, you reduce or remove one possible barrier to entry for your project. They are also of a high quality: they are the products of much thought and experience; indeed most of them are revisions of previous versions of themselves, and the modern versions represent a great deal of accumulated legal and technical wisdom. Unless your project has truly unusual needs, it is unlikely you could do better, even with a team of lawyers at your disposal.

Below is a list of licenses that in my opinion meets these criteria; in parentheses are the standard formal abbreviation for the license and an authoritative URL for its full text. This list is not in order of preference, but rather in roughly descending order from strong copyleft at the top to completely non-copyleft at the bottom. The exact provisions of each license differ in various interesting ways (except for MIT and BSD, which differ only in uninteresting ways), and there isn't space here to explore all the possible ramifications of each for your project. However, many good discussions of that sort are available on the Internet; in particular the Wikipedia pages for these licenses generally give good overviews.

If you have nothing else to guide you and you want a copyleft license, then choose either the GPL-3.0 or the AGPL-3.0 — the difference between them will be discussed below — and if you want a non-copyleft license, choose the MIT license. I've put those licenses in boldface to reflect this:

GNU General Public License version 3 ( GPL-3.0 , https://www.gnu.org/licenses/gpl.html)

( , https://www.gnu.org/licenses/gpl.html) GNU Affero General Public License version 3 ( AGPL-3.0 , https://www.gnu.org/licenses/agpl.html)

( , https://www.gnu.org/licenses/agpl.html) Mozilla Public License 2.0 ( MPL-2.0 , https://www.mozilla.org/MPL/)

, https://www.mozilla.org/MPL/) GNU Library or "Lesser" General Public License version 3 ( LGPL-3.0 , https://www.gnu.org/licenses/lgpl.html)

, https://www.gnu.org/licenses/lgpl.html) Eclipse Public License 1.0 ( EPL-1.0 , https://www.eclipse.org/legal/epl-v10.html) (Note that version 2 of the EPL was almost ready as of mid-2014, and may be out by the time you read this.)

, https://www.eclipse.org/legal/epl-v10.html) MIT license ( MIT , https://opensource.org/licenses/MIT)

( , https://opensource.org/licenses/MIT) Apache License 2.0 ( Apache-2.0 , https://apache.org/licenses/LICENSE-2.0)

, https://apache.org/licenses/LICENSE-2.0) BSD 2-Clause ("Simplified" or "FreeBSD") license ( BSD-2-Clause , https://opensource.org/licenses/BSD-2-Clause)

Note that there are some arguments for choosing the Apache License 2.0 as a default non-copyleft license, and they are nearly as compelling as those for choosing MIT. In the end, I come down in favor of MIT because it is extremely short, and both widely used and widely recognized . While the Apache License 2.0 has the advantage of containing some explicit defenses against misuse of software patents, which might be important to your organization depending on the kind of project you're launching, the MIT license is fully compatible with all versions of the GNU General Public License, meaning that you can distributed, under any version of the GPL, mixed-provenance works that contain MIT-licensed code. The GPL-compatibility situation for the Apache License, on the other hand, is more complicated — by some interpretations, it is compatible with GPL version 3 only. Therefore, to avoid giving your downstream redistributors the headache of having to read sentences like the preceding ones, I just recommend the MIT license as the default non-copyleft license for anyone who doesn't have a reason to choose otherwise.

The mechanics of applying a license to your project are discussed in the section called “How to Apply a License to Your Software”.