I have a GPLv3 project and MIT licensed code that would be useful and I want to use said MIT-licensed code.

I heard that MIT is GPLv3 compatible but at the same time MIT license requests not removing it, so I am unsure how I can satisfy both licenses. Should MIT code continue to be marked with MIT license (only part of code that was used - easy when it is a single file or folder)? Or can I freely mix it with GPLv3 code and drop MIT license mentions?


1 Answer 1


You have created a work that incorporates parts from several other works, distributed to you under a variety of free licences (in your case, MIT and GPLv3). This is a perfectly normal thing to do in the free-software world, so don't panic. Each of those licences will have certain obligations, all of which you must now follow with respect to your derivative work.

As you have observed, you will need to preserve all existing copyright notices. In files that you have modified, you will need to add your own copyright notice to the existing list. The MIT licence obliges you to preserve its licence text, but does not require that it govern the distribution of the resulting project, so you should include it in a way that reflects that (perhaps in a file called LICENSE.OLD, starting "This text is included pursuant to the obligations of an upstream licence and must be retained in any derivatives, but it is not the licence applicable to this code"). As you have used GPLv3 code, your project must be distributed in its entirety under GPLv3; if the MIT-derived code contains any references to its licence status, these should be updated to reflect that.

  • A typical way to distribute a MIT-licensed part that you don't modify is to keep it separate and add a note that this specific portion may be used under the following license: <MIT license here> Jul 18, 2022 at 12:48
  • @user253751 if you feel that's good advice, you should write up your own answer. As far as I can see, though, that conflicts with GPLv3 s5c.
    – MadHatter
    Jul 18, 2022 at 13:25
  • Insofar as s5c says "this license... does not invalidate such permission if you have separately received it," I don't see a problem with @user253751 saying, "In addition to permission to use this portion under the GPL, you are also separately permitted to use this portion under the following terms..."
    – apsillers
    Jul 18, 2022 at 13:31
  • @apsillers having gone back and re-read it, I'm afraid (despite my earlier comment) I don't agree. If you are the sole rightsholder in the GPLv3 portion, I agree you can do that - but if you're the sole rightsholder in that, you can do anything that doesn't conflict with the MIT licence, so that's not an observation about what the GPL permits, merely an observation that it's not binding on you. If you aren't, then you don't have the necessary permissions not to comply with s5c, so you simply can't do as you suggest, and must instead release the whole work under GPLv3.
    – MadHatter
    Jul 18, 2022 at 15:34
  • I think I appreciate that the distribution of the MIT portion, as a component of a GPL'd work, can't, within that particular conveyance, carry MIT permissions absent GPL obligations. I guess you could offer a MIT portion as a standalone work and state, truthfully, "The below section is also available verbatim from <location> under the MIT license whose header and associated copyright notice is ..." but I can appreciate how such a notice differs from actually affording an MIT-only option of rights.
    – apsillers
    Jul 18, 2022 at 17:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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