The question of who owns the code almost always comes up at the worst moment: when the working relationship ends and someone else is supposed to take over. Bad intent is rarely behind it. Most of the time, nobody thought about it when the project started, and the contract says nothing, or just “source code included.”
This article covers Swiss law, which applies to most contracts between Swiss SMEs and Swiss agencies.
What Swiss copyright law says about code
- Code is a work. Under Art. 2(3) of the Swiss Copyright Act (CopA), computer programs count as works and are protected by copyright.
- The rights arise with the person who writes the code. Under Art. 6 CopA, the author is the natural person who created the work, so the developer, not whoever ordered or paid for it.
- For employees, only the employer may exploit the code. If a program is created in an employment relationship in the course of the employee’s duties and contractual obligations, Art. 17 CopA gives the employer alone the right to exercise the exclusive rights of use. If an agency’s employees write your code, those rights sit with the agency, not automatically with you.
- Between the agency and you, the contract decides. Art. 17 CopA only applies to employment. There is no such rule for work commissioned from an agency or a freelancer; what you agreed on applies.
- If the contract says nothing, you get only what’s necessary, when in doubt. Under the purpose-of-transfer principle (Zweckübertragungstheorie), without an agreement only the rights the purpose of the contract requires pass to you. Further rights stay with the agency when in doubt.
- A copy isn’t a right. Under Art. 16(3) CopA, owning a copy of a work doesn’t grant any rights of use. Even handing over the source code on a storage medium doesn’t simply transfer the copyright.
How to read your contract
Get out the development contract, the quote, and the agency’s terms and conditions, and look for answers to these questions:
- Transfer or right of use? Does it say the copyright passes to your company, or only that you may use the code?
- Exclusive or not? May only your company use the code, or may the agency also use it for other clients?
- Modify and have it developed further? May you change the code and have another provider develop it further? That’s the question that matters when you switch.
- Pass it on? May you pass the code on to a new provider, a subsidiary, or a buyer if you sell your company?
- The agency’s own building blocks? Does the agency use its own framework, modules, or templates across several projects, and what applies to those parts?
- Handover? When and in what form do you get the code: with version history, or only as an archive at the end?
- Third-party components? Which open-source packages and purchased extensions are inside? They keep their own licenses, no matter what your contract with the agency says.
If you find nothing on points 1 to 4, or there’s no written contract at all, the purpose-of-transfer principle applies. What the purpose of the contract requires is then a matter of interpretation, and that’s exactly where disputes start.
What you can ask for and negotiate afterward
Under Art. 16(1) CopA, copyright is transferable, so a transfer is still possible after the project has ended. Whether the agency agrees and on what terms is up for negotiation:
- A written transfer of the rights to the code. With an explicit scope: use, modify, have third parties develop it further, pass it on. Under Art. 16(2) CopA, transferring one right only includes other rights if that was agreed. That’s why it pays to name each right.
- A broad right of use for the agency’s own building blocks. If the agency won’t transfer its framework or modules, you can ask instead for a perpetual, transferable right of use that includes changes by third parties.
- Handover of the repository with its version history, not just an archive. The history shows when and why the code changed.
- The right moment. The rights are easiest to get while the working relationship is still going. How to approach a switch in the right order is covered in Switching agencies without losing your website.
Rights are little use without access
Even if you own all the rights: without the repository, hosting account, database, domain, and access, you can’t do anything with them. The practical side matters as much as the legal one. Which accounts should be in your company’s name is listed in the software takeover checklist, and for apps built with Lovable, Supabase, or Firebase, also in Who owns your app and your data? For a new project, Commissioning a web application without lock-in helps make sure the question never comes up.
When you need a lawyer
This article isn’t legal advice. You can read the contract yourself and answer the questions above without legal training. If it’s about transferring the rights, a dispute with the agency, or a lot of money, the contract belongs with a lawyer experienced in IT and copyright law. The Takeover Assessment from Unique-P doesn’t review contracts or rights to the code either; it reviews the application itself.
How it works with Unique-P
With Unique-P, the opposite of the fallback rule applies. The code and all rights to it are yours, without reservation. Whatever is open source stays open source. I never insist on rights to what I write for you, whether it’s a new build, a takeover, or ongoing support. The code lives in your company’s repository from day one, and you can carry on with someone else at any time without asking me.
Sources
- [1]Federal Act on Copyright and Related Rights (Copyright Act, CopA), SR 231.1, Art. 2, 6, 16, and 17 · Fedlex, Swiss Confederation
- [2]IT-Projektvertrag: Die rechtliche Einteilung der Herstellung von IT-Programmen (in German) · WEKA Business Media
- [3]Software-Entwicklungsvertrag: Diese Punkte müssen Sie beachten (in German) · WEKA Business Media
- [4]Softwareentwicklung (in German) · law.ch
- [5]Übertragung von Software-Rechten (in German) · law.ch