Published on November 20, 2026
Estimated Read Time: 7 minutes
Want to copyright my source code? Protection is automatic once you write it down, but registering with the Copyright Office gives you proof and the right to sue. Here's how it works.
Wondering how to copyright my source code? Protection starts automatically the moment you write the code in a fixed form, like a saved file. Registration with the U.S. Copyright Office is the optional second step: you file an application, pay a fee, and send in a deposit copy of the code.
That second step matters more than most developers realize. Registration gives you a public record of ownership, and it's what lets you file an infringement lawsuit in federal court.
If you're asking whether to copyright my source code at all, the answer depends on what the code is worth to you. This guide covers what copyright protects in code, when registration is worth doing, and how the filing works from start to finish.
Yes. Under the Copyright Act of 1976, copyright attaches to an original work the instant it's fixed in a tangible form (17 U.S.C. § 102). Computer programs count as literary works, so the code you save to a drive or push to a repository is protected without a form, a fee or a © symbol.
So is source code automatically copyrighted even if you never publish it? It is. Your private repository is covered, and so is a script sitting on your laptop. Because of the Berne Convention, that protection also reaches most other countries.
Automatic protection has a catch, though. It's hard to prove in a dispute, and it won't get you into court. For the bigger picture on that gap, see our explainer on whether you need to register a copyright to be protected.
Copyright protects the expression in your code, not the idea behind it. That means the actual text you wrote, including its structure, organization and comments, is covered. It also covers the object code a compiler produces from it.
A few things sit outside that protection:
Your registration covers only what you authored. If a third of the project is borrowed, you'll exclude that part on the application. Algorithms raise their own questions, since the method itself isn't protected even when your written version is.
You don't need to, but you'll probably want to. Registration is required before a U.S. work's owner can sue for infringement. It also makes statutory damages and attorney's fees if you register before the infringement starts, or within three months of first publication.
Source code copyright registration also helps in quieter ways:
Should you copyright my source code before launch, or wait? Filing early is cheap insurance, because the benefits above depend on timing. If your code is a throwaway script, skip it. If it's the core of a product, register it. And if you're deciding between keeping the code secret and protecting it through copyright, read trade secret vs. copyright for source code first, because your choice affects what you submit.
You register online through the Copyright Office's eCO system. The general product-filing process is laid out in our step-by-step guide to copyrighting software, so here's the version specific to code.
The author is whoever wrote the code, unless it was a work made for hire, in which case it's the employer or the commissioning party. Sort that out before you fill anything in. Employee code and freelancer code follow different ownership rules, and a contract can change the default, so check your agreements before you file.
The $45 Single Application works when one person wrote the work and owns it, and it isn't a work made for hire. Everything else, including a team-written codebase or a work for hire, goes on the $65 Standard Application. Most commercial software lands in the Standard bucket.
You'll give the title, the year of completion, the author, whether it's published, and the claim. Say "computer program" for the type of work, and list any pre-existing or third-party code you're excluding.
For a program, you send identifying portions of the source code rather than everything. If the code contains trade secrets, the Office lets you redact portions. We cover that in detail in how to submit source code as a copyright deposit.
Pay the fee, submit, and then you wait. You'll get an email confirmation, and the Office may write back with questions if something on the application is unclear. Processing time varies, and the Office posts current estimates on its site. Your effective date of registration is the day your complete application, fee and deposit all arrive, which is why filing early helps.
Copyright Engine prepares and files the application for you.
You can. Registration doesn't require you to release the code to the public. Unpublished code is registered as an unpublished work, and you can file whenever you're ready.
Publication does matter in one respect. If you distribute copies, license the software or ship it to customers, the work counts as published. That changes how you fill out the application, and it starts the clock on those three- and five-year windows mentioned earlier.
Keep your deposit privacy in mind too. Copyright Office records of registered works can be inspected, and deposit copies may be copied under certain conditions, such as litigation. That's exactly why redaction rules exist. If your repository holds client credentials, API keys or unreleased features, strip them out of the deposit before you upload anything. It's far easier to leave sensitive material out at the start than to ask the Office to deal with it afterward.
People sometimes assume a certificate is a force field. It isn't. It doesn't stop someone from independently writing similar code, and it doesn't protect the way your software works.
For that, you'd look at patents, which are a separate system with a different standard. A software patent has its own application, cost and standard, so it's worth a separate conversation with a patent attorney.
AI-assisted code is another gray area. The Copyright Office expects you to disclose AI-generated material that's more than minimal and to claim only your own human authorship. Say so on the application rather than hoping nobody asks.
If your situation involves a co-founder dispute, a contract with unclear terms or a large acquisition, talk to a copyright attorney. This article is legal information, not legal advice.
Pick the version of your code you want to register, usually the latest stable release. Note the date of first publication, if any, list every contributor, and flag the third-party code that needs excluding. With those four items written down, the application takes under an hour.
You can see the Copyright Office's own overview of the process at copyright.gov/registration.