I've read online that MIT is a permissive licence which allows for the code to be used in propriety products, but the licence texts seems to conflict with that, which I'll quote below:

Copyright (c) <year> <copyright holders>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.


So, it seems according to the licence, derivative works must distribute the licence, and hence give those who receive the software the right to re-distribute the software, which is incompatible with most commercial software licences.

A strict reading would be that only exact copies have to distribute the copyright notice, although this seems a bit silly, as it is trivial to perform a minor modification to avoid an exact copy. Why would the licence bother including the restriction to maintain the copyright notice when that restriction is so easily circumvented?

So if "copy" includes derived works, I can only conclude that any work derived from a MIT licenced work must permit free redistribution, which means it's not really a commercial friendly licence.

The only way around this seems to include the MIT licence files, but then say that these licence files only apply to certain parts to the software, oh and by the way the rights you get to redistribute those parts doesn't really apply practically because they're part of the compiled code now and tightly coupled with bits you can't redistribute (particularly if it wasn't a separate library but just some source code copied into the commercial project).

That seems crazy, and I've also never seen such a notice. But on the other hand, just distributing the MIT licence with the software without these qualifications seems to me that a court might reasonable rule that it applies to the whole software, as you can't break compiled code into one executable into "parts" in any sense.

I'd note also, that if I'm using software X, which contains code from X1, X2, X3 ... XN, to use software X myself presumably I'd have to include the licences from X1, X2, X3 ... XN in distributions of my software.

So for every open source library I use, I'd have to look into its dependencies, find all the licences for it's dependencies, then look into those dependencies, and find all the licences for them, and so on.

This seems like an absolute nightmare, not really "permissive" as the MIT licence is commonly described. It seems completely impractical to comply with.

Am I correct in this analysis or have I totally missed something?

  • Clearly, if you want to modify something, you have to copy it first. My IANAL opinion is that you have to include the license even in modified copies.
    – wilx
    Feb 27, 2017 at 14:48
  • 5
    Since this question is about understanding and complying with open source licenses, you might want to ask it on Open Source instead (and delete it here). The question does not seem to be about software engineering as defined in the help center. Resurrecting and drastically expanding a year-old question is also rather weird, surely it would be better to ask a new but more focused question?
    – amon
    Sep 3, 2018 at 11:36
  • "So if "copy" includes derived works" It doesn't. The MIT license only talks about the software you received under that license. Sep 4, 2018 at 10:51

4 Answers 4


Software licenses only apply to the part of the software that the licensor owns copyright.

If you use MIT-licensed software as a part of a larger work (e.g. as a library or module), only that component is required to be covered by the MIT license. The code you write can be licensed however you choose.

This is how, for example, Microsoft was able to sell Windows NT despite containing some BSD-licensed open-source code.

If you are unsure how to integrate software covered by the license into your own product from a licensing perspective, you will need to consult with an intellectual property attorney to ensure that your specific software project is set up correctly from a legal perspective. Here on Software Engineering we are able to speak to the broad ideas of copyright and licensing, but are not qualified to dig into the details of your particular situation nor can we dispense legal advice.


How is the MIT licence not viral?

Because using code licensed by the MIT License does not require your whole application to be released under the MIT License. Period. In other words, the code that you write yourself is yours. It's copyrighted and licensed by you (you get to choose which license you prefer to use). The portion of code you did not write is still the copyrighted property of the original author (see below for when the author is an organization). You are still required to display the copyright notice and license from the MIT licensed code. However, you could release your code under a creative commons license or keep it proprietary.

Whether you use the MIT Licensed code as a library or you actually take the code and incorporate it into your product, the only code that is MIT Licensed is the code that came from that source.

This is in stark contrast to the GPL license. If you were to do the same with GPL code, you would be required to distribute your project under the GPL license--making it viral. That was done intentionally by it's creator, Richard Stallman.

NOTE: there are legal disputes regarding linking to a GPL library from a non-GPL project and whether that requires your project to be GPL. To my knowledge the GPL has not been formally tested in court so there is no precedence to work from. It is also unknown how the GPL is treated in legal systems arount the world.

How to comply with it?

That's actually pretty easy.

  1. Don't change the copyright notice in any files from the MIT licensed project
  2. If there is an attribution clause (some variations do) then your application needs to say that it uses code from the MIT licensed project

What can I do with MIT licensed code?

Like the license says you can do any and all of the following:

  • copy
  • modify
  • merge
  • publish
  • distribute
  • sub-license
  • sell copies

Practically that means you can fork any MIT licensed code, make changes, and redistribute your forked copy as you see fit. It means you can take one or two files/functions from the MIT licensed project and incorporate it in your code. It means there are no restrictions from you selling your software simply because you forked some MIT licensed code and incorporated it in your own project.

What can I NOT do with MIT licensed code?

  1. Claim copyright. You didn't write it, and the copyright notice must remain in tact for the MIT licensed code. Period.
  2. Have protection from code that implements patents. ASL 2.0 was modified to specifically address those concerns and none of the clauses needed to convey patent license(s) with the software license.

More information on copyright

Copyright is a very complex subject, and is slightly different depending on what nation you are in. However, there are some general principles that do apply to countries that have copyright laws:

  • If you wrote it, you hold the implicit copyright
  • Registering a copyright is not necessary, but helps end disputes quicker if you ever have to go to court
  • As a copyright owner, you can license other people to use your copyrighted material. That license provides the limits of the freedoms people can take with your copyrighted code
  • It is unlawful to claim copyright for any work that you did not create.

Rules diverge a little bit on corporate copyright ownership, etc. depending on your locale. Most large open source projects (like Apache, who is governed by US copyright law) retain a corporate copyright to the source code, and requires all contributors to sign an agreement that all work on Apache Software is a "work for hire" so the copyright belongs to the Apache Software Foundation. Within US Copyright law, this is both correct and lawful.

If you don't understand copyright law, particularly for where you are from, then I highly recommend you take a class or two to at least cover the basics. Even a short seminar can shed a lot of light.

A license cannot grant the copyright to anyone. The law for transferring ownership of a copyright varies from country to country. In the USA, copyright is treated like real estate, so it can be bought and sold like a house. In other countries, you might not be able to transfer ownership at all.

  • 1
    I think this is a very optimistic reading of the licence. Clearly if I do a minor modification, say change tabs to spaces, rebuild and distribute the binary, I have no copyright claims and the MIT licence requires me to distribute my version under the MIT licence
    – Ewan
    Sep 4, 2018 at 15:28
  • 3
    @Ewan, No license transfers copyright. That is a different matter altogether. You merely have the license to redistribute your version of the code. I repeat, copyright remains with the original authors. Transferring copyright through sale or other means is subject to the laws of the country in which the copyright is held. NEVER assume a license gives you the copyright. Sep 4, 2018 at 15:40
  • That is exactly the assumption you are making.
    – Ewan
    Sep 4, 2018 at 15:42
  • @Ewan, how? I did not say you can claim the library is yours. I did not say you could change the copyright banner. Both of those are restrictions in the license. I will make some updates to the answer to make that clearer. It'll be later this afternoon since something literally came up while typing this response. Sep 4, 2018 at 15:53
  • You are claiming that you have copyright over the stuff you write. "Period." this just isn't true, for example the tabs to spaces.
    – Ewan
    Sep 4, 2018 at 16:00

First of all, the MIT license is called permissive because it has very few requirements that must be fulfilled to satisfy the license when creating a derived work. In fact, the only requirement is that you don't remove the copyright, permission notice and disclaimer.

Also, copyright law does not presume that if a part of a larger work is under license X, then all of that work is expected to be licensed the same way. The default assumption in copyright law is that a copyright license only applies to whatever is placed explicitly under that license.

  • A license notice at the top (or bottom) of a source file applies only to the contents of that file
  • A license notice at a common location in a project applies only to the files of that project

In fact, the GPL uses some specially crafted text to try to apply to more than just the files explicitly brought under the GPL and it has not yet been proven in court that this holds up to scrutiny.

On a different note, the MIT license grants you the right to sublicense the work.

All this combined makes that you can take a MIT-licensed library, combine it with your own (commercial) code and offer the resulting binary only under your own closed-source license.
The requirement in the MIT license is that you can't remove the license notice, but not that you have to reproduce it in a different location if you distribute binaries only.

Regarding having to check all recursive dependencies for their licenses, that is something you have to do anyway to know what each part requires of you in order to be allowed to re-use it. And you should also do it to make sure that the dependency tree does not contain anything that is under the GPL or a similar strong copyleft license.
In the end, you are legally responsible for complying with all the licenses of third-party contents of your work.

  • If you use the MIT-licensed source code plus a bit if your source code to compile a binary, and distribute that binary without the MIT notice, haven't you effectively removed the notice?
    – nog642
    Jun 15, 2020 at 8:07
  • @nog642, I suggest you ask that in a new question (if one doesn't already exist). Jun 15, 2020 at 8:59

It's not clear.

The problem is that a "Derivative Work" can legally (depending on jurisdiction) be something which requires the MIT licensed software to function.

You can't make a Derivative Work without respecting the licence conditions and "the Software" is not defined in the licence.

Without a clear permission to make Derivative Works, and licence them differently, in the licence you are left with hacky solutions like distributing the MIT licensed dll as a separate download and arguing that that means your program isn't a Derivative Work.

We will only know the true situation after a number of people have been taken to court and established a legal precedent one way or the other.

However, we should note that if you are in the position to worry about being sued by the provider of free software. Then by far the best solution regardless of the exact licence is simply to contact the copyright owner and purchase from them a commercial licence with your required wording

  • I'm not sure in which jurisdiction the content of my favorite music CD might be considered "derivative work" of my CD player...even for (L)GPL licenses the "derivative work" is a very opinionated and debatable point (not in the spirit but legally). Sep 4, 2018 at 12:15
  • its worldwide now europa.eu/rapid/press-release_IP-03-1152_en.htm
    – Ewan
    Sep 4, 2018 at 12:24
  • No, note that I wrote "...the content of my favorite CD...". Technology to both build the media and then to declare it as compatible and label it as "CD" is patented (which is a pretty different thing). The content of the CD (the music) needs the media (CD) which needs the player (CD player) but it cannot, under any circumstance, be considered "derivative work". I think the best definition of d.i. I know/I'm aware of is in the US copyright law. Sep 4, 2018 at 12:39
  • well the content without a cd obviously doesnt require a cd player. as soon as you start making cds with the content on you need a licence of some kind. its definitely a derivitive work of a cd, no question. the cd is probably a derivitive work of the cd player, but its a chicken and egg situation. I guess the spec is the origional work
    – Ewan
    Sep 4, 2018 at 12:44
  • 1
    Hmmmm IANAL but CD isn't derivative work, simply you can't produce them without some patented technologies (and maybe, I'm not sure) you can't label it as "CD" without permission because it's a trademark (or whatever). Definition of derivative work doesn't include "use"...that's exactly the point GPL license is so tricky in its wording (to the point to pretend to be a contract instead of a license). Sep 4, 2018 at 12:52

Not the answer you're looking for? Browse other questions tagged or ask your own question.