Is it possible to alter the code of the Chili plugin, which had its latest release on July 2008, and it is licensed under the MIT license, to then license it under GPL?

As far I can see, there is no restriction about the new code being licensed under the same license. Is it really so, or is there a minimum number of changes?

In my case, I would change the jQuery plugin in normal Javascript code that is executed in a CMS. This essentially means that, among other things:

  • The code will not use the "ChiliBook" namespace.
  • The function will not be invoked as $($element).chili(), but as GlobalObject.ChiliHighlighter.process($jquery_element), where "GlobalObject" is a JavaScript object used from the CMS.
  • The code will allow other modules to alter the GlobalObject.ChiliHighlighter object to add functions that are optionally called from GlobalObject.ChiliHighlighter.process() when they are defined.

As alternative, as the repository I am using allows me to include code not licensed under GPL 2 or higher license when the code is not maintained anymore, could the plugin be considered not maintained anymore, as its last version was released three years ago?

  • 2
    If you really want an authoritative answer, you should consult a lawyer (in the relevant jurisdiction, for example the answer could be different in Italy than in the US)
    – MarkJ
    Commented Sep 5, 2011 at 12:24
  • 1
    This question should be migrated to the Open Source Stack Exchange so that it is no longer "off topic" and closed. Here is a duplicate question on that site: opensource.stackexchange.com/questions/5832/…. Commented Apr 11, 2020 at 18:18
  • @GabrielStaples Thank you for the suggestion. I think the question isn't anymore relevant, now that the Chili plugin has been dual-licensed under GPL and MIT.
    – apaderno
    Commented Jan 11, 2023 at 17:09
  • @apaderno, it may not be relevant for you anymore, but it's definitely relevant for the world. The world needs this info. Commented Jan 11, 2023 at 17:12
  • @GabrielStaples To be migrated, the question should be re-opened and closed again. I doubt they would do it. Then, since the question is asking for a specific jQuery plugin, the answer would just be that the plugin is dual-licensed under GPL and MIT, which means I could use it under GPL, and edit it under that license. Changing the question to remove any reference to Chilli would just make the question too broad.
    – apaderno
    Commented Jan 11, 2023 at 17:38

3 Answers 3


It's technically legal.

The MIT (Expat) license places a few restrictions on you. These are a subset of the GPL license. Therefore, if you relicense the code under the GPL, and keep the MIT notice, then you've satisfied the terms of the MIT license and may legally redistribute the code.

Note that you may not claim copyright ownership; you'll have to acknowledge the original copyright.

[edit] Some people don't seem to understand how F/OSS works in conjunction with copyright and license law. Everything starts with copyright, if only because that's the default. Under the copyright doctrine, the author gets the right to make copies of source code. Under the MIT license, that right is granted to me, as well as the right to recursively grant it to others. Note that the MIT license explicitly includes the right to sublicense. Quoting: "the rights to use, copy, modify, merge, publish,distribute, sublicense, and/or sell"

When I sublicense code, I cannot grant rights that I didn't originally have. In the case of the GPL, I am explicitly forbidden to sublicense only some rights. But neither in law nor in the MIT license do I have an obligation to sublicense all rights as a whole.

Therefore, the MIT license grants me the explicit right to sublicense rights, and neither the law nor the MIT license prohibits me to sublicense only some rights. Also, neither restricts the form in which I do. Therefore, I have the undeniable right to grant a GPL sublicense on that code.

  • 7
    @vartec: You're not changing the license under which you received the code. You're creating a new license between you and the new recipient, and it can have whatever terms you want. (The new recipient may get additional rights under the original license, but that has no effect on the new license.) The norm is for a sublicense to give some fraction of the rights in the original license. For example, a sublicense rarely includes the right to sublicense, which the original license must have included for there to be a sublicense. Commented Nov 3, 2011 at 4:22
  • 4
    @vartec: Essentially, you're arguing that a copyright license that grants the right to sublicense somehow actually doesn't grant the right to sublicense. I'm not sure on what basis you're making this argument though. Do you have some cite to any relevant legal authority? Are you saying a copyright holder can't grant others the right to license his work? Or do you think the MIT license somehow fails to do this or doesn't intend to? Commented Nov 3, 2011 at 19:35
  • 1
    @David: you don't seem to understand what "sublicensing" means.
    – vartec
    Commented Nov 5, 2011 at 17:16
  • 2
    @vartec: A link to a source that explains it would be great, because I think you don't understand what it means. Commented Nov 5, 2011 at 17:18
  • 7
    The MIT license has this bit in it: "The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software." That means any fork would need to be available under the MIT license. The changes could be listed as GPL. The fork could be listed as GPL+MIT. But the fork can not be listed as GPL only - that is a clear violation of the MIT license. Commented Jul 17, 2017 at 22:18

Yes. But the effect may not be what you think it is.

The MIT license includes all the rights the GPL gives and more. And while people who receive your distribution only receive a GPL license to elements you added, they still receive an MIT license (from the original authors, not from you) to any elements contained in the work that the authors offered under that license.

They may not know this, and so far as I know, no law obligates you to tell them. But if they "violate" the GPL license with respect to protectable expression contained in the work that you did not author (or that wasn't contributed by others to the GPL-only release), they have not violated your license or your copyright. (Actually, that should be rather obvious -- you only hold copyright to expression you authored.)

So you haven't converted any copyrightable elements from the MIT license to the GPL license. You've simply added new ones which are only offered under the GPL license and released the elements in a mixed/combined work.

  • 1
    so in practice, i would do this: copy a MIT project, replace everything MIT with GPL (so no trace is left of the project having been MIT), and then additionally link to the original MIT project in a few important places (not every source file though), mentioning that the base-project is available under MIT. would that be ok/legal (given i keep the original copyright owner statements)?
    – hoijui
    Commented Mar 12, 2018 at 7:03
  • 4
    @hoijui You must leave all MIT license headers and permission notices intact and include them with your new project. And unless your intent is to deceive, I don’t see why you would replace all mentions of “MIT”. It won’t change anything, the parts you take will still be MIT licensed. Just add your own GPL license header below it, it will be valid for all copyrightable changes (i.e. not just renaming variables) that you make to the source code. BTW this is why most projects have a copyright header in every file.
    – jmiserez
    Commented Mar 27, 2018 at 17:38
  • @jmiserez ok. so lets look at one file of my project then: i leave the MIT header, make some changes and add a GPL header (as i want my changes to only be available under the GPL). now a 3rd party comming about my file would have to honor both MIT and GPL? i have never seen a file with two license headers, and i would think, most people would just choose the license they like, as they do not know what the legally right way is. also, why do i have to include the MIT, if by honoring the GPL, one automatically also honors MIT?
    – hoijui
    Commented Mar 30, 2018 at 14:48
  • 1
    @hoijui Any rights you have under the MIT license come with the restriction “The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.” But honestly I’m not sure if you need to keep all of the notices, or just one, IANAL. But I’m sure you need to include a notice somewhere. If you didn’t, you wouldn’t be compliant with the MIT license anymore, which would mean you’d lose all rights to use the code in your project. FYI the Linux kernel has files with multiple licenses, they use SPDX headers: lwn.net/Articles/739183
    – jmiserez
    Commented Mar 30, 2018 at 19:06
  • 2
    How sad is it that someone wants to attempt to GPL code that was built on a MIT license. It seems to be against everything the MIT license stands for. Commented Apr 1, 2018 at 20:36

Nothing to add to the explanations in the answers already given, but here are instructions for how to shape your source file headers (source):

2.2 Adding GPL’d modifications to permissive-licensed files

A more complicated case occurs when a developer makes copyrightable changes to a permissive-licensed file that the developer is incorporating into a GPL’d program. Developers in this situation typically apply the GPL to their modifications. (However, it is possible for the developer instead to contribute new code under permissive terms, such as the permissive license that governs the unmodified file. We discuss that case in § 2.3.)

Even though the permissive license of the external project grants legal permission to incorporate code from that project into a GPL’d project, the developer of the GPL’d project must nonetheless comply with the notice preservation requirement in the permissive license. In a project that uses the file-by-file method, a developer who makes copyrightable modifications to a permissive-licensed file should place a new copyright notice and permission notice above the existing one and should make clear that the developer has modified the file. The top of the file will then appear as follows:

 * Copyright (c) 2007  GPL Project Developer Who Made Changes   
 *  This file is free software: you may copy, redistribute and/or modify it  
 *  under the terms of the GNU General Public License as published by the  
 *  Free Software Foundation, either version 2 of the License, or (at your  
 *  option) any later version.  
 *  This file is distributed in the hope that it will be useful, but  
 *  WITHOUT ANY WARRANTY; without even the implied warranty of  
 *  General Public License for more details.  
 *  You should have received a copy of the GNU General Public License  
 *  along with this program.  If not, see .  
 * This file incorporates work covered by the following copyright and  
 * permission notice:  
 *     Copyright (c) YEARS_LIST, Permissive Contributor1   
 *     Copyright (c) YEARS_LIST, Permissive Contributor2   
 *     Permission to use, copy, modify, and/or distribute this software  
 *     for any purpose with or without fee is hereby granted, provided  
 *     that the above copyright notice and this permission notice appear  
 *     in all copies.  

It is very important that the developer preserve the entire copyright notice, permission notice, and warranty disclaimer as they appeared in the original code, as required by the permissive license. We sometimes see GPL notices mixed in with permissive license notices—a confusing practice that obscures both the provenance of the code and the precise permissions that were granted by the various copyright holders listed in the notices. When different copyright holders have released their contributions under different terms, the terms that each has placed on his particular contribution should be specified. We recommend making a clear separation and using indentation, as in the example above.

This manner of organizing the notices in the file makes it convenient for developers to choose whether to contribute under permissive terms or under the GPL. If they wish to make their contributions available under permissive terms, they can add their copyright notices to the lower group. If they wish to contribute under the GPL, they can add their copyright notices at the top. Note, however, that in a single source file it is typically very difficult, and often completely infeasible, to determine which parts of such a file are covered by permissive terms. If the goal is to make additional code available under permissive terms only, the method described in § 2.3 should be used.

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