License Header Generator

Pick a license, set the year and copyright holder, and get back a properly-commented copyright header for your source file. The comment style is inferred from the filename — /* */ for .ts / .go / .css, # for .py / .sh, <!-- --> for .html, and so on. Sixteen SPDX-licensed templates included. Pure client-side, no upload, no tracking.

Inputs

Header

block 0 chars 0 lines

License text (plain)

Plain-text version of the rendered license, with comment markers stripped. Useful for documentation, README files, or a LICENSE file at the root of your repository.

How it works

The 16 license templates are pulled from their canonical SPDX texts — nothing is paraphrased. The page substitutes {{year}}, {{holder}}, and {{project}} with your inputs (or with the placeholders [copyright holder] / [project name] if you leave a field blank), then wraps the result in the comment style inferred from your filename.

The filename extension controls the comment style: .ts / .js / .go / .rs / .css use /* */, .py / .sh / .rb / Dockerfile use #, .html / .vue / .astro use <!-- -->, .clj uses ;;, and .m (MATLAB) / .tex / .erl use %. Use the dropdown to override.

The output is plain text — no markdown, no HTML escape entities. Copy the result into the top of your file, or download it as .txt to verify the layout before pasting.

Which license should I pick?

Permissive: MIT, MIT-0 (no attribution required), Apache-2.0 (with patent grant), BSD-2-Clause, BSD-3-Clause (with non-endorsement), ISC, BlueOak-1.0.0, BSL-1.0. Pick one of these if you want the widest redistribution.

Copyleft: MPL-2.0 (file-level), LGPL-3.0 (library-friendly), GPL-3.0 (project-level), AGPL-3.0 (network use). Pick one of these if you want derivative works to stay open.

Public domain: Unlicense, CC0-1.0. No attribution required, no copyright retained. WTFPL is the humorous cousin. Pick one of these if you truly want unconditional reuse.