How to Protect Source Code Ownership When Hiring Contractors

Home  /  Business Law  /  Contracts Lawyer  /  How to Protect Source Code Ownership When Hiring Contractors

25.Aug, 2026 Hansen Tong 0 Contracts Lawyer,Copyright,Startup Law

When you hire a freelance developer or an outside agency to build your software, you are not automatically the owner of what they create. Under US copyright law, independent contractors own the work they produce unless you have a written agreement that transfers those rights to you. A verbal understanding, a paid invoice, or even a signed non-disclosure agreement does not change that default.

This matters because your software is likely your most valuable business asset. If ownership is unclear, you cannot cleanly raise investment, sell the company, license the product, or enforce your rights against infringers. Sophisticated investors and acquirers check IP chain of title — and gaps in contractor agreements are among the most common deal-killers at due diligence.

Here is what your contracts need to say, and why it has to be in writing before work begins.

1. Understand the Default: Contractors Own What They Build

Under the US Copyright Act (17 U.S.C. Section 101), a “work made for hire” — where the hiring party owns the copyright automatically — applies to employees, not independent contractors. For a contractor’s work to qualify as work made for hire, two conditions must both be met: the work must fall into one of nine specific statutory categories, and there must be a written agreement signed by both parties expressly stating it is a work made for hire.

Software source code does not fit neatly into those nine categories. That means even if you pay a contractor in full and they deliver the code, copyright ownership stays with them unless you have a separate written IP assignment in place. Many founders discover this only when a former contractor asserts rights over code that powers their core product.

2. Use an IP Assignment Agreement — Not Just an NDA

An NDA protects confidential information. It does not transfer intellectual property rights. A separate IP assignment clause — or a standalone IP assignment agreement — is required to transfer copyright, patent rights, and moral rights from the contractor to your company.

A proper IP assignment for software development should cover:

  • All work product created during the engagement, including drafts, tools, and derivative works
  • Pre-existing IP the contractor is permitted to incorporate, with a limited license granted to you for that pre-existing material
  • Future improvements or modifications based on the delivered code
  • The contractor’s cooperation obligation — agreeing to sign additional documents to perfect the transfer
  • A waiver of moral rights where applicable (particularly relevant for contractors in countries that recognize them)

The assignment should be signed before work begins — not delivered as an afterthought at the end of the engagement.

3. Address Pre-Existing and Open Source Code

Contractors routinely incorporate their own pre-existing libraries, tools, and utilities into client work. If your IP assignment clause is too broad — assigning all code delivered to you — the contractor may have to give up ownership of tools they use across multiple client projects, which they will resist signing.

A practical approach: require the contractor to disclose any pre-existing IP they intend to incorporate before work begins. Grant yourself a perpetual, irrevocable license to use that pre-existing IP as embedded in your product. This gives you the rights you actually need without the contractor having to assign code they own independently.

Open source components present a related issue. Certain open source licenses — particularly GPL-family licenses — impose “copyleft” obligations that can affect how you distribute or commercialize code. Your contract should require the contractor to disclose all open source components used and obtain your written approval before incorporating any copyleft-licensed code into your product.

4. Handle Non-Compete and Non-Solicitation Clauses Carefully

Non-compete clauses in contractor agreements are frequently unenforceable. California Business and Professions Code Section 16600 renders most non-compete agreements void in California — and California courts have applied this rule even to contractors working remotely for California-based companies. Other states have enacted similar restrictions in recent years.

A narrow, time-limited non-solicitation clause — restricting the contractor from poaching your employees or targeting your specific clients — is more defensible than a broad competitive restriction. If IP protection is the underlying concern, a properly drafted IP assignment with a confidentiality obligation achieves that goal more reliably than an unenforceable non-compete.

5. Include a Representations and Warranties Clause

Your contractor agreement should require the contractor to represent and warrant that:

  • The work they deliver is original and does not infringe any third party’s intellectual property rights
  • They have the full right to assign the IP to you
  • The code does not incorporate any third-party material for which they do not have the right to grant you a license
  • They have disclosed all open source components and pre-existing IP incorporated into the deliverables

These warranties create a direct breach-of-contract claim if the contractor delivers infringing code or misrepresents ownership — giving you a clear legal basis to recover damages rather than relying solely on copyright law.

6. Register Copyright in Your Software

Once you have a properly executed IP assignment and the code is delivered, register the copyright in the software with the US Copyright Office. Registration is not required for copyright to exist — ownership arises at creation. But registration is required before you can file an infringement lawsuit in federal court, and it gives you access to statutory damages and attorney’s fees that are otherwise unavailable.

For commercial software, registration at or near the time of deployment is a routine risk-management step that most companies skip until they need it in litigation.

7. What a Technology Lawyer Structures That Boilerplate Misses

Generic contractor agreement templates rarely address the specific IP risks in software development. They often use work-made-for-hire language that does not cover software, omit pre-existing IP disclosure requirements, and fail to address open source compliance obligations.

A technology lawyer who works with software companies drafts contractor agreements that reflect how development actually works — including the pre-existing IP carve-out, the open source disclosure process, and the cooperation clause that ensures you can perfect the assignment without chasing a contractor who has moved on. If you are building a product that depends on contractor-developed code, an IP assignment agreement reviewed by a specialist is not optional — it is foundational to owning what you are paying to build.

For startups preparing for investment or acquisition, reviewing IP assignment agreements across all prior contractors is a standard due diligence step. It is far less expensive to fix gaps now than to negotiate around them in a term sheet.


Frequently Asked Questions

If I pay a contractor in full, do I own the code they wrote?
Not automatically. Under US copyright law, independent contractors retain ownership of their work unless there is a signed IP assignment agreement. Payment alone does not transfer copyright.

Can I use a work-made-for-hire clause instead of an IP assignment?
Work-made-for-hire provisions have limited application to software. Because source code does not fit cleanly into the statutory categories, an IP assignment clause is the reliable mechanism for transferring ownership. A technology lawyer typically includes both — a work-made-for-hire clause where applicable and a full assignment for everything else.

What happens if I forgot to get an IP assignment and the contractor has already delivered the code?
You can still execute a retroactive IP assignment. Contractors are generally willing to sign one, particularly if the relationship ended amicably. A technology lawyer can prepare a retroactive assignment that properly covers the deliverables and any pre-existing IP incorporated into them.

Does an NDA protect my ownership of the code?
No. An NDA protects confidential information from disclosure — it does not transfer copyright or other IP rights. You need a separate IP assignment clause for that.

Can a contractor in another country assign IP to a US company?
Yes, but the assignment should be drafted to account for the law of the contractor’s jurisdiction, particularly around moral rights — which some countries recognize and which are not automatically waivable. A technology lawyer can draft an assignment that addresses cross-border IP transfer requirements.

Is open source code a problem for ownership?
It can be. Open source licenses range from permissive (MIT, Apache) to restrictive (GPL). Copyleft licenses require you to release derivative works under the same terms — which can be incompatible with a commercial, proprietary product. Your contractor agreement should require disclosure and approval of any open source components used in your codebase.

Conclusion

The code your contractors write is only yours if your contract says so — clearly, in writing, signed before work begins. Relying on payment, verbal agreements, or generic templates leaves ownership in a legally ambiguous position that will surface when it is most inconvenient: during fundraising, M&A due diligence, or an infringement dispute.

If your contractor agreements need review or you are preparing IP documentation for investment or acquisition, contact Hansen Tong at TOSLawyer.com to get agreements that properly protect your ownership of the software you are building.


Comments are closed.