I'm working on a project comprised of a small HTML page and a JavaScript script.

From the HTML page I include a library which is licensed under the GNU General Public License v3.0, and from my script I invoke some of its functions.

I would like to release the HTML page and the script file under the MIT License, but I'm not sure... Is it allowed?

I know MIT and GPL-3.0 code can be mixed, but in this case the GPL-3.0 code is a dependency of the would-be-MIT code.

I think I would be allowed to simply publish a code repository with my MIT code (without a copy of the GPL-3.0 library), and to publish the web page with a link to both my repository and the original repository of the library. Would I be correct? Would I also be required to host a copy of the source code of the library?


  • Who is owning the copyright on the code? If you own it alone, you could dual license it. In principle, you need agreement of other contributors to change licenses. May 12, 2020 at 19:08

1 Answer 1


No, you cannot distribute GPL-covered code in an MIT-licensed project. You have to use GPL (or a compatible license) for the project as a whole, if you include GPL-covered libraries.

I can also be argued that running a website is distributing the code, so even combining it on the front-end of a running web server is at least very fishy and must not be done; GPL very likely was chosen for that very reason.

  • Running software on a server is absolutely not distribution/conveyance in the sense of the GPL. But including the software in the frontend absolutely is, and therefore implies responsibilities like providing a copy of the license and the corresponding source code to recipients (visitors of the website).
    – amon
    May 10, 2020 at 14:17
  • @amon yes, thanks. When saying 'webserver' I meant to refer to the front-end part which is visible to outside users. I amended my text to reflect that. May 10, 2020 at 14:29
  • Your first paragraph is contradictory. The MIT license is compatible with the GPL, so you are both saying that you can and cannot use the MIT license. May 10, 2020 at 17:28
  • @BartvanIngenSchenau I don't follow your argument. I say GPL in MIT: bad. (but MIT in GPL ok) May 10, 2020 at 17:46
  • @planetmaker, and then you go on to say "Use GPL (or a compatible license)", but MIT falls under the parenthetical remark. What might be better o say is that the project as a whole needs to be distributed under the GPL (due to the GPL library), but all individual files, including those written by the OP, only need to be under a GPL-compatible license, for which the MIT qualifies as well. May 10, 2020 at 17:54

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.