MIT License
A short, permissive open-source software license: almost anyone can use, change, or sell your code, as long as they keep your copyright and license notice and accept that it comes with no warranty.
On this page
What is the MIT License?
The MIT License is a permissive open-source software license that originated at the Massachusetts Institute of Technology (MIT). Putting it in a project tells everyone clearly: you can use, copy, modify, merge, publish, distribute, and even sell this code inside paid products.
Imagine pinning your favorite recipe to a public board with a note: “Cook it, tweak it, or even sell the dish in your restaurant—just keep my name and this note attached, and don’t blame me if your kitchen catches fire.”
The MIT License boils down to two rules: keep the original copyright and license notice, and understand that the author gives no warranty or liability.
How does the MIT License work in a project?
You do not need to register or pay a fee to use the MIT License. In practice, it works in four simple steps:
Add a license file: the author places a file named
LICENSEin the project root with the year, copyright holder’s name, and the standard MIT text.Others reuse the code: anyone who finds the repository knows they have legal permission to learn from it, edit it, or build it into personal or commercial apps.
Keep the notice when sharing: whenever someone redistributes the software—or a substantial part of it—they include the original copyright line and permission notice.
Use at your own risk: the software is offered “as is.” If a bug later causes trouble, users cannot hold the original author legally liable.
The "license": "MIT" line you often see in package.json is metadata for tools. The full LICENSE file in the repository is the actual legal text.
Read a real MIT License file
The MIT License is famous for being tiny—the entire agreement is just three short paragraphs.
- The top line
Copyright (c) 2026 Alex Chenstates who created the work and when. - The middle paragraphs grant broad rights (use, copy, modify, distribute, sell) with one main condition: include the copyright and permission notice in copies.
- The ALL-CAPS block starting with
THE SOFTWARE IS PROVIDED "AS IS"disclaims warranties and limits the author’s legal liability.
Here is a complete LICENSE file you can put in a project root (just replace the year and name with your own):
MIT License
Copyright (c) 2026 Alex Chen
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.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.Keeping those standard paragraphs intact with your own year and name is all it takes to release a project under the MIT License.
How is the MIT License different from GPL?
Open-source licenses roughly fall into two families: permissive (like MIT) and copyleft (like GPL).
| Compare | MIT License (permissive) | GPL License (copyleft) |
|---|---|---|
| Using in closed-source apps | Allowed—your combined or modified app can stay closed-source | Distributing a derivative app generally requires open-sourcing it under GPL too |
| Main obligation | Keep the original copyright notice and MIT license text | Keep notices and share the source code of your changes |
| Length and readability | Three short paragraphs anyone can read in a few minutes | Much longer and more detailed, covering distribution and patent rules |
Another popular permissive choice is Apache 2.0—it also allows closed-source commercial use while adding an explicit patent grant. Also remember: a public repository with NO license defaults to “all rights reserved,” meaning others legally cannot copy or reuse it.
When is the MIT License a good fit?
Choose MIT when you want as many people and companies as possible to adopt your code with minimal legal friction.
- Open-source libraries and frameworks: projects like React, Next.js, and Vue use MIT so individuals and teams can adopt them freely.
- Starter templates and UI snippets: code specifically meant to be copied and customized into other people’s apps.
- Course examples, demos, and side projects: code you want learners to remix and build on without worrying about complex rules.
It is short, familiar to developers and company legal teams worldwide, and compatible with almost every other license.
It does not require anyone to share their improvements back with you, and unlike Apache 2.0 it does not include an explicit patent grant.
Common things people get wrong
If code is public on GitHub with no LICENSE file, is it free to use like MIT?
No. Without a license, default copyright law (“all rights reserved”) applies. People can read or fork the repo on GitHub, but legally cannot copy, modify, or redistribute the code. Adding a LICENSE file is what grants permission.
Does the MIT License let me copy code and delete the author’s name?
No. MIT is permissive, not public domain. Its core condition is keeping the original copyright notice and permission notice in copies or substantial portions—which is why apps often list third-party licenses in an “About / Open Source Licenses” screen.
Is MIT-licensed code banned from paid or commercial products?
Not at all. The license explicitly grants the right to use, modify, sublicense, and even sell copies of the software, as long as you keep the notice and accept there is no warranty.
Quick quiz
Your company builds a paid app that uses an MIT-licensed component library. Do you have to open-source the company’s app, and what must you include?
No, you do not have to open-source the app. MIT is a permissive license that allows commercial and closed-source products. You only need to keep the library’s original copyright notice and MIT permission notice in your distribution.
Remember this: MIT License means “almost anything is allowed—just keep the copyright and license notice, and don’t hold the author liable if it breaks.”
Read further
These official guides are great if you want to read the exact wording or compare licenses.