Skip to content

No. 90Startups4 min read1,036 words

Who owns the code? IP in software contracts

Who owns the code when you hire an agency or freelancer: work made for hire, copyright assignment, pre-existing IP, open-source licences, accounts and escrow.

Written by
Lazy Devs
Published
Updated
Sources
Cited inline

Key takeaways · 05

The short version

  1. 01Paying for software doesn't automatically make you its owner. In both the US and the UK, the default is that the creator owns the copyright unless a written agreement says otherwise.
  2. 02In the US, 'work made for hire' only applies to commissioned work in nine specific categories with a signed agreement, so software contracts usually also need an explicit written assignment of copyright.
  3. 03Expect the agency to keep ownership of its pre-existing tools and libraries, and to give you a licence to use them. That's normal; make sure the licence is broad and permanent.
  4. 04Open-source components come with their own licences. Ask for a list, and check that none of them conflict with how you plan to use or distribute the product.
  5. 05Ownership on paper is not enough. Repositories, hosting, domains and third-party accounts should be in your organisation's name.
On this page · 09

Most founders assume that if they pay for software, they own it. Legally, that often isn't how it works. Ownership depends on the contract, on where you and your supplier are, and on what was actually written down. Getting it wrong can block an investment round, an acquisition or simply a change of supplier.

This guide explains the principles in plain English and points to the official sources. It isn't legal advice: contracts and laws differ by country, so have a lawyer review your agreement before you sign.

The default: the creator owns it

Copyright in code belongs, by default, to whoever wrote it. When your own employees write it as part of their job, the law generally treats your organisation as the owner. When an outside agency or freelancer writes it, the default is different.

In the UK, the Intellectual Property Office's guidance on ownership of copyright works says that when you commission someone to create a work, the first owner of the copyright is the person or organisation that created it, not you, unless you agree otherwise in writing. The same guidance notes that freelancers and contractors usually keep copyright in what they produce unless a contract says otherwise.

In the US, the rules turn on the idea of a "work made for hire".

"Work made for hire" in the US, and why it's not enough on its own

The US Copyright Office's circular on works made for hire explains that a work is made for hire in two situations:

  1. It's created by an employee within the scope of their employment, or
  2. It's specially ordered or commissioned, and it falls within one of nine specific categories listed in the law, and there is a written agreement, signed by both parties, expressly saying it's a work made for hire.

If any of those conditions is missing, it isn't a work made for hire. The nine categories are things like contributions to collective works, compilations, translations and parts of audiovisual works. Custom software doesn't fit neatly into them, which is why well-drafted development contracts don't rely on "work made for hire" wording alone.

Instead, they include an assignment: a clause that transfers the copyright to you. Under the US Copyright Act, a transfer of copyright ownership isn't valid unless it's in writing and signed by the owner of the rights. A handshake, an invoice or a line in an email thread won't do it.

What a good contract covers

Ask your lawyer to check that the agreement deals with each of these:

  • Assignment of the work created for you. Everything created specifically for your project (code, designs, documentation) is assigned to you, with the assignment taking effect on creation or on payment.
  • Pre-existing IP. Agencies bring their own tools, starter kits and libraries. It's normal for them to keep ownership of those and give you a licence. Check that the licence is permanent, covers everything you need to run and change the product, and survives the end of the relationship.
  • Open-source components. Almost every modern product includes open-source software, each piece under its own licence. Permissive licences (such as MIT or Apache 2.0) mainly require attribution; copyleft licences (such as the GPL family) can require you to share your own source code under certain conditions, depending on how you distribute the product. The Open Source Initiative's licence list and choosealicense.com explain the common ones. Ask for a list of the main dependencies and their licences.
  • Third-party services. Payment providers, email services and APIs are used under their own terms, not owned. Make sure the accounts are yours.
  • Confidentiality and reuse. Whether the agency may reuse general techniques (usually fine) and whether anything about your product must stay confidential.
  • Moral rights and waivers, where your jurisdiction has them.
  • What happens on termination. You should leave with everything created so far, whatever the reason the project ends.

Ownership on paper vs ownership in practice

A perfect contract doesn't help if you can't get to your code. Ownership in practice means:

  • Repositories in your organisation's account, with the agency invited as members.
  • Hosting, cloud, domains and DNS registered to your organisation, with your billing.
  • Third-party accounts (analytics, email, payments, error monitoring) owned by you.
  • Secrets stored where you control them, and rotated when people leave.

This is how we work by default: we build in our clients' repositories and accounts, so the code, accounts and infrastructure are theirs throughout, and there's nothing proprietary to keep paying us for. See how we work.

What about source code escrow?

Escrow means a third party holds a copy of the source code and releases it to you under agreed conditions, typically if the supplier goes out of business. It matters when you license software you don't own, such as a vendor's platform. If you own the code and it already lives in your own repository, escrow adds little.

Red flags

  • The contract says nothing about intellectual property, or only that you get a "licence" to software built specifically for you.
  • Assignment only happens "on final payment" of a project with no defined end.
  • Repositories, hosting or domains in the agency's name.
  • A proprietary platform you can't run without paying the agency indefinitely.
  • No answer when you ask which open-source licences are in the product.

More warning signs are in red flags when hiring a development agency.

Checklist before you sign

  • Written assignment of all work created for you
  • Clear list of pre-existing IP, with a broad, permanent licence to you
  • Open-source licences listed and compatible with your plans
  • Repositories, hosting, domains and accounts in your name from day one
  • You keep everything created so far if the project ends early
  • A lawyer in your jurisdiction has reviewed the agreement

If you'd like to see how ownership works in our agreements before you talk to anyone else, ask us. We're happy to walk you through it.

This article explains general principles and isn't legal advice. For decisions about your contract, consult a qualified lawyer in your jurisdiction.

FAQ · 05 questions

Frequently asked questions

If I pay an agency to build my software, do I own the code?

Not automatically. In the US, a commissioned work is only a 'work made for hire' if it falls into one of nine categories in the Copyright Act and both parties sign a written agreement saying so. In the UK, the government's guidance is that the creator is the first owner of a commissioned work unless you agree otherwise in writing. Your contract should assign the copyright to you explicitly.

What is a copyright assignment?

A written transfer of copyright ownership from the creator to you. Under US law, a transfer of copyright ownership isn't valid unless it is in writing and signed by the owner of the rights. Most software development contracts include an assignment clause covering everything created for the client.

Can the agency reuse code it wrote for me?

It depends on the contract. Agencies usually keep their pre-existing tools and general know-how and license them to you, while the work created specifically for you is assigned to you. If parts of your product are confidential or competitive, say so in the contract.

What is source code escrow?

An arrangement where a third party holds a copy of the source code and releases it to you under agreed conditions, for example if the supplier stops trading. It mainly matters when you license software rather than own it. If you already own the code and it lives in your own repository, escrow adds little.

Is this legal advice?

No. This article explains the general principles and points to official sources. Contracts and jurisdictions differ, so have a lawyer review any development agreement before you sign it.

Filed underStartupsSecurity

Related service

MVP Development

A real product in users' hands in weeks, not quarters.

Learn more

Next step

Want this built right?

This is the work we do every day. Tell us what you are building and we will show you exactly how we would ship it.

First reply
Within 1 business day
Typical start
1–2 weeks
Pricing
Fixed price per phase
You own
All code and accounts