Who owns the code an agency builds? How to make sure it's you

In the UK, the agency owns the copyright in the code it writes unless the contract hands it to you. Here's what to check before you sign.

Key takeaways

  • Under UK law the developer is the first owner of the copyright in code it writes. You only own it if the contract assigns it to you in writing.
  • Check when ownership passes, usually on payment, and what happens to the agency's own reusable code.
  • Open-source components stay under their own licences. You can use them, but you don't own them.
  • Owning the code is only half of it. Keep the repository, hosting, domain and third-party accounts in your own name or easy to transfer.

When you pay an agency to build software, it’s natural to assume the result is yours. In the UK that isn’t automatic. Who owns the code depends on what your contract says, and many buyers only find out what theirs says when they try to change supplier.

This article answers the questions that come up most often, in the order they tend to arise. It describes the general position under UK law and isn’t legal advice, so have a solicitor read any contract you’re about to sign.

Who owns the code by default?

Software is protected by copyright in the UK as a literary work. Under the Copyright, Designs and Patents Act 1988, the first owner of the copyright is the author. When an employee writes code as part of their job, the employer owns it.

An agency or freelancer isn’t your employee. So if the contract says nothing about ownership, the copyright in the code they write stays with them, even though you paid for it. A court may decide you have a licence to use the code for the purpose it was made for, but a licence is weaker than ownership and you may have to argue for it.

How do you make sure you own it?

Copyright moves from one owner to another by assignment, and an assignment of copyright only takes effect if it’s in writing and signed by the person giving it up. In practice that means a clause in your contract or statement of work that assigns the intellectual property in the work to you.

Look for three things in that clause:

  • What is assigned. It should cover the source code, designs, documentation and anything else made specifically for you.
  • When it passes. Many agencies assign ownership on final payment. That’s reasonable, as long as you know the date and it isn’t tied to something open-ended.
  • Who signs. The agency signs for its own staff. If it uses freelancers or subcontractors, it needs assignments from them too, or it can’t pass on rights it doesn’t hold.

What about code the agency reuses?

Most agencies have their own libraries, templates and tools that they bring to every project. They won’t assign those to you, because they need them for other clients. This is often called background IP, and the work made for you is foreground IP.

That split is normal. What matters is that the contract gives you a permanent licence to use the background IP as part of your software, which continues if you move to another supplier and doesn’t depend on an ongoing subscription.

Do we own the open-source parts?

No. Almost all modern software is built on open-source components, and they stay under their own licences, such as MIT, Apache 2.0 or GPL. You can use them, change them and ship them, within the terms of each licence.

Most licences are permissive and only ask for a copyright notice. Some, such as the GPL family, have conditions that matter if you distribute the software to others. A good agency keeps a list of the components and licences it used and can explain anything unusual.

Is owning the code enough?

Not on its own. To run your software without the agency, you also need control of the places it lives and the services it depends on. Before launch, check who holds:

  • The code repository. It should be in your organisation’s account, or one that can be transferred to you, with full history.
  • The hosting account. Whether it’s AWS, Azure or another provider, you need to be able to take it over or move what’s in it.
  • The domain name and DNS. Register domains in your company’s name.
  • Third-party services. Payment providers, email delivery, maps, analytics and AI model accounts should be in your name or easy to hand over.
  • Credentials and documentation. Passwords, keys and the instructions for deploying and restoring the system.

If any of these sit in the agency’s name with no way to transfer them, you’re more tied to that agency than the contract suggests.

What should the contract say about leaving?

Even good relationships end. A sensible contract covers what happens when they do: the agency hands over the code, documentation and credentials, transfers any accounts it holds for you and gives reasonable help to the next team. Ask how much notice is needed and whether the handover help is charged.

It also helps if leaving is technically simple. When infrastructure is defined in code and the code lives in your repository, a new team can rebuild the platform from what you already have.

How we handle it at Hatcha

You own the source code and intellectual property we create for you on final payment, and the code lives in your own repository from the first commit. We host on AWS in London, in a separate AWS account for each client inside our AWS organisation, and the account can be detached from our organisation if you want to take it elsewhere. Everything is defined in code and documented, so another team could pick it up.

If you’re comparing agencies for a custom software project, put the ownership questions above to each of them. Our guide to how much custom software costs covers the rest of what to look for in a quote, and you can talk to us about your own project.

Keep reading

Have a project in mind?

Tell us what you need and we'll reply within one working day. Once it's sent, you can book a free 30-minute call with Louie, our founder, and we'll follow up with a written quote.