I wrote a simple plugin in JavaScript and I want to put it on GitHub for people to download and use it freely. I saw many people include MIT licence in a file.

How can I obtain the MIT licence? Do I have to go to http://opensource.org to apply/register or do I just need to paste the declaration on top of my source code?

  • 31
    Please don't just pick a license because other people picked it. Go read the differences between the major open source licenses, be it MIT, BSD, Apache, or GPL. Decide for yourself how you want your code licensed. You may find you have significant issues with what certain licenses do allow or don't allow.
    – SnakeDoc
    Dec 29, 2016 at 17:20
  • 1
    @SnakeDoc: License-shopping like you advocate is really a sort of special-snowflake syndrome. Unless you have a specific legal or business-model reason to need a certain license, the most important aspect of choice of license is whether it's going to be compatible for combining with other code, and there are only two aspects of a license that contribute to that: (1) popularity (likelihood that another project uses the same license) and (2) permissiveness, i.e. not encumbering mixing with other licenses. MIT happens to be good in both regards. Dec 29, 2016 at 18:03
  • 23
    @R.. That's absurd. You have 4 summaries to read - that's it. Read them, then pick one - don't pick one and just hope it says the things you want it to say. For all OP knows, MIT license says the software author must pay every user $50! It's a legal contract... don't "guess" at what it does.... besides, you wouldn't even know if you had "a specific legal or business-model reason to need a certain license" if you never read what they are about!
    – SnakeDoc
    Dec 29, 2016 at 18:13
  • OK, if you only want to consider a few big ones, it's reasonable. Dec 29, 2016 at 19:58
  • 1
    You might find TLDR Legal a useful place to research the different possible open-source licenses.
    – user3551
    Dec 30, 2016 at 0:10

3 Answers 3


You just include the licence in your software, no registration needed. Your software is always copyright protected, you state the terms of use through a licence.

  • 1
    I assume the question was partly concerning whether the standard license text itself is protected by copyright or something... might be good to mention that.
    – user541686
    Dec 29, 2016 at 22:36
  • Can you may be provide some references to support your answer? Dec 30, 2016 at 19:07
  • @PhilippeOmbredanne I work professionally as a programmer and with opensource, I am the source to what I state. If you like to read more: opensource.org
    – superhero
    Jan 1, 2017 at 14:48

You don't "obtain" a licence. It's not a licence like a driver's licence that gives you permission to do something; rather, the license you apply to your software is you giving permission for other people to do something. So, just like your driver's licence is the government saying, "You have our permission to drive a car, as long as you behave in certain ways", the license you apply to your software is you saying "You, the user, have my permission to use this software, as long as you behave in certain ways."

So, all you need to do is just include the licensing statement in your software. But, as others have said, do have a look at the other licences available and make sure you understand what rights you're giving people by your choice of license.

  • It would be helpful if the downvoter could say why this answer is wrong.
    – David Richerby
    Dec 29, 2016 at 21:07
  • 2
    This answer directly addresses the big misconception the OP has about software licenses. It's a perfectly valuable answer.
    – Solomonoff's Secret
    Dec 29, 2016 at 21:20
  • 1
    Also, @BenjaminW should note that these licenses are non-repudiable. He can't take back the rights he decided to gave when licensing under X.
    – Ángel
    Dec 29, 2016 at 22:43
  • I would add that some licenses also makes certain requirements of you as the author of the program also - for example making the source-code available, not using closed libraries, and allowing users to make changes to their copies of your program and distribute these changes. Another point is that using certain libraries and such (eg. the free version of the Qt library) may have already committed you to a specific licence. Dec 30, 2016 at 0:44
  • 2
    @BaardKopperud: This is another common mistake. Licensing your software does not, and cannot, impose any restrictions on you as the author and copyright holder, only on others who obtain (limited) rights under the license. The only way these requirements come back on you is if you incorporate someone else's code under a restrictive license into your own, producing a combined work for which another party also holds copyright. Dec 30, 2016 at 2:12

Seeing as you mentioned GitHub specifically, it's worth noting that GitHub includes several features to make software licensing easier:

  1. When creating a new repository, you'll be shown the option to add a license at the same time you configure the other settings. Just select a license from the "Add a License" dropdown and the appropriate file will be added to the repository.

  2. A license can easily be added to an existing repository by adding a file through GitHub, naming it LICENSE or LICENSE.txt, and selecting the license type from the dropdown that is displayed. See https://help.github.com/articles/adding-a-license-to-a-repository/ for more.

In the case of the MIT license, once the license file is in the repository, you're done; the license will apply to your project.

Other licenses might recommend taking additional steps, like adding a license header to each of your source files. Be sure to do your research so you know the license is being applied properly. That said, to my knowledge there are no licenses which require you to register your application or do anything more complicated than add the appropriate license and notifications to your project.

http://choosealicense.com/, which is managed by GitHub includes more information about some common licenses and how to apply them to your project.

Your Answer

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