# Which license should I pick for my first open source project?

Source: https://gitshowcase.com/forum/discuss/which-license-should-i-pick-for-my-first-open-source-project/
Site: GitShowcase Forum, category Open Source Maintainers
Published: 2026-11-16. Updated: 2026-11-16. Replies: 0.

## Question by Nils Haugen (staff), 2026-11-16

For most first projects, pick MIT if you want the shortest permissive license, Apache 2.0 if you also want an explicit patent grant, and GPLv3 if you want improvements shared back. If your project joins an existing ecosystem, copy that ecosystem's license. Do not publish with no license at all.

*This is general information about how common licenses work, not legal advice. For a company project, a dual licensing plan or anything with money at stake, ask a lawyer.*

## Start with the default: no license means no permission

Many first time maintainers skip the license because they "just want people to use it." That backfires. According to [Choose a License on no license](https://choosealicense.com/no-permission/), creative work, code included, is under exclusive copyright by default, and unless you include a license that says otherwise, nobody else can copy, distribute or modify it without risk. Public hosting terms let people view and fork your repository, but that is not enough for the experimenting, modifying and sharing that people usually expect from a public repo.

So a license file is what turns "visible code" into "code others can use". It is also why companies and careful developers will not touch an unlicensed dependency.

## The decision rule

Ask two questions:

1. **Do you mind if someone takes your code into a closed source product?** If you do not mind, pick a permissive license. If you want improvements to come back, pick a copyleft license (one that requires derived work to stay open under the same terms).
2. **Does your project depend on, or plug into, a community with a strong default?** If yes, follow it. The [Choose a License front page](https://choosealicense.com/) puts this first: use the license preferred by the community you are contributing to or depending on, and your project will fit right in.

## The three common options

| License | In one line | Conditions | Good fit |
| --- | --- | --- | --- |
| MIT | Short, permissive, lets people do almost anything, including closed source versions | Keep the license and copyright notice | Libraries, CLIs, templates, portfolio projects |
| Apache 2.0 | Permissive, with an express patent grant from contributors | Keep notices, state changes | Projects where patents or company adoption matter |
| GPLv3 | Strong copyleft: people may use and change it, but distributed versions must share source | Disclose source, same license, keep notices, state changes | Tools where you want improvements shared back |

The permissions and conditions above come from the [Apache 2.0](https://choosealicense.com/licenses/apache-2.0/) and [GPLv3](https://choosealicense.com/licenses/gpl-3.0/) pages on Choose a License, and the MIT summary from the home page. The Apache and GPL pages both list commercial use as permitted and list liability and warranty as limitations, meaning you are not on the hook for how others use the code. Apache 2.0 additionally says it does not grant trademark use, so your project name stays yours.

## What each one means in practice

- **MIT.** Someone can bundle your library inside a paid closed source app and owe you only the copyright notice. That is the trade for maximum adoption.
- **Apache 2.0.** Same freedom, plus an explicit patent license from each contributor. The text also says that if someone sues over patents claiming the work infringes, their patent licenses under it end. It requires modified files to carry notices that they were changed.
- **GPLv3.** If someone distributes a modified version, the whole work must stay under GPL with source available. That discourages closed forks but can also stop some companies from using your code at all. If you want a library that proprietary apps can link to, the GPL text itself points to the GNU Lesser General Public License for that case.

## Step by step: add the license correctly

1. Create a file named `LICENSE` in the repository root. Choose a License says to copy the license text there (GPL projects traditionally use `COPYING`).
2. Replace placeholders like the year and your name, where the license has them.
3. Add the SPDX identifier to your package metadata so registries display it. For example in `package.json`:

```json
{
  "name": "my-first-project",
  "version": "0.1.0",
  "license": "MIT"
}
```

Use `Apache-2.0` for Apache. For GPL, the site suggests `GPL-3.0-or-later`, or `GPL-3.0-only` to disallow future versions.

4. Mention the license in your README, ideally with a one line section at the bottom. See [how to write a README people will try](/forum/discuss/how-should-i-write-a-readme-so-people-actually-try-my-project/) for where it fits.

## Mistakes to avoid

- **Mixing license text.** Paste one full license, not a summary.
- **Changing the license later without asking contributors.** Once the work has other contributors, each is a copyright holder, as the Choose a License no license page points out, so relicensing gets hard. Decide before you accept outside code.
- **Picking a license for a dependency's sake only.** Check what your dependencies require before you decide. A GPL dependency can shape what you are allowed to ship.
- **Using a made up license.** Custom terms scare off adopters and are easy to get wrong.

If you genuinely want no restrictions at all, the site points to a public domain dedication instead of no license, since opting out of licenses does not opt you out of copyright.

---
Cite as: GitShowcase Forum, "Which license should I pick for my first open source project?", https://gitshowcase.com/forum/discuss/which-license-should-i-pick-for-my-first-open-source-project/, accessed 2026-11-18.
