Guide
Selling your source code to AI companies: a UK guide
AI companies now pay for private source code. Models that write and review code have already learned from the public code on the internet. What they have not seen is private, working software and the history of how a real team built it, so that is what they are buying.
This guide explains who buys code, what makes a codebase valuable, who owns it under UK law, and how to license it without giving up ownership. It is written for owners of UK software companies, companies with in-house development teams, and anyone holding code from a product that is no longer sold.
Who buys source code
Code is now a regular part of these deals:
- When Google bid $10m for Spirit Airlines' records in a US bankruptcy auction, the records included about 30 million lines of code alongside emails and Teams messages.
- SimpleClosure, a US firm that helps startups shut down, now includes code or data sales in 47% of its deals, according to MIT Technology Review. It has helped list nearly 500 million lines of code across 3,000 repositories.
- Some buyers deal in code directly. DataVendor runs a marketplace for private codebases. Turing's Project Lazarus acquires startups' codebases and operational data. Replay lists code and commits among the records it licenses.
Buyers use code to train and test models that write software, and to build practice environments where AI agents learn to fix bugs and add features in real codebases.
What makes a codebase valuable
Size matters less than most owners expect. Dori Yona, co-founder and chief executive of SimpleClosure, told Upstarts Media: "There could be a codebase that's a quarter of the size, but double the value."
| Factor | Why it matters |
|---|---|
| Rarity | Code in less common languages, such as Ruby or C++, "can fetch top dollar". Specialist domains are rare too. |
| History | Commits, pull requests and review comments show how the code changed and why. Buyers such as Mercor take repositories with their commits, pull requests and issues. |
| Context | Tickets from Jira or Linear, designs from Figma, documentation and the emails around the work add value. |
| It runs | Buyers value tests, CI and a setup they can run. |
| Real use | Software that customers relied on for years shows how real problems were solved. |
Public code is worth little. DataVendor puts it plainly: public repositories "are already cloneable, so they do not carry a private-supply quote."
Older software and code that is no longer sold
Code from a product you no longer sell is not necessarily worthless. If it is written in a language or for a domain that is rare in public code, that rarity can work in its favour. Engineering and scientific software and long-running industry systems are the kind of specialist code that is less common in public.
There is no guarantee of demand, though. Each buyer prices data against its own research plans, and two buyers can value the same code very differently. The only reliable way to find out is to put a short description in front of several buyers.
Who owns the code under UK law
You can only license code your company owns. Check this first, because buyers will ask.
- Employees. Under section 11 of the Copyright, Designs and Patents Act 1988, the employer is normally the first owner of copyright in work an employee creates in the course of their employment.
- Contractors and agencies. The Intellectual Property Office says a contractor "will usually retain copyright in any works he produces, unless there is a contractual agreement to the contrary" (GOV.UK). Check every contractor and agency contract for a written assignment of copyright.
- Client work. If you built software for clients and your contracts give them the rights, that code is theirs. Leave it out.
- Open-source and third-party code. Libraries and components written by others are licensed to you on their authors' terms. List them so the buyer can decide, and expect most deals to cover only your own code.
If the company is in liquidation, the liquidator can sell or otherwise deal with the company's property, including its code, using the powers in Schedule 4 to the Insolvency Act 1986. An administrator has similar powers under Schedule 1. Our guide for office-holders explains how.
Clean the code before anyone sees it
Passwords, keys and tokens
Private repositories often contain passwords, keys and tokens. GitGuardian's 2026 report found that 32.2% of internal repositories contain at least one hardcoded secret, against 5.6% of public ones. Before any export:
- Scan the code and its full history for passwords, API keys and tokens.
- Change every credential that turns up, even if the system is no longer used.
- Remove secrets from the history as well as the latest version.
Personal data
Code repositories hold more personal data than people expect: commit author names and email addresses, test data copied from production, logs and comments. Treat it like any other personal data in your records. Our UK guide explains how de-identification and UK GDPR apply. Customer data should never be part of a code deal.
Export controls
UK export controls cover software as well as goods, and they can apply when software is sent abroad electronically. If your code has security, strong encryption or defence uses, check whether a licence is needed before it goes to an overseas buyer.
How a code licence works
Many code deals are licences, not sales. The buyer gets a copy of the agreed code for agreed purposes, and your company keeps ownership. With a non-exclusive licence, you can carry on selling and developing the software, and license the same code to other buyers. Some buyers ask for exclusivity by default: Labelbox Prism, for example, structures its licences as exclusive unless agreed otherwise.
Agree these terms in writing before any code moves:
- Scope: which repositories, branches and years.
- Permitted use: AI training and testing only.
- No release: the buyer must not publish the code, ship it or pass it on except as agreed.
- Security: how the copy is stored and who can access it.
- Exclusivity: if the buyer wants it, it should pay more for it.
- Payment: the amount, the schedule and any revenue share.
- Deletion: what happens to the copy when the licence ends.
There is no public price list. SimpleClosure said it handled 100 sales of startups' Slack, email and other workspace data in the year to April 2026, with payouts of $10,000 to $100,000 per deal. In one deal reported by MIT Technology Review, a crypto startup being wound down received about $25,000 for its code base. Code sold alongside the tickets, documents and messages that explain it is usually worth more than code alone. Our valuation guide covers what moves the price.
Step by step
- List what you have. Repositories, languages, years of history and roughly how many people contributed.
- Check ownership. Employees, contractors, clients and third-party code.
- Clean it. Remove and change credentials, and deal with personal data.
- Gather the context. Tickets, documentation and design files that go with the code.
- Get a valuation from facts. Nobody needs to see your code to tell you whether it is likely to be a fit.
- Compare written offers. Then agree the terms, deliver the agreed copy and get paid.
TydeX is independent and is not affiliated with any of the companies named in this guide. We run this process for UK companies: we describe your code to buyers without sharing it, negotiate the terms and bring you written offers. You sign directly with the buyer you choose. Get a free valuation to find out whether your code is a fit.
Questions
Can we license the source code of software we still sell?
Usually, yes, as long as the licence is non-exclusive and limited to AI training and testing. Some buyers ask for exclusivity by default, so check this first. The contract should stop the buyer from publishing the code, passing it on or using it outside the agreed purpose, and you keep full ownership.
Is old or legacy code worth anything?
It can be. Code in less common languages can be worth more because AI developers have seen less of it. Demand still depends on what each buyer is working on, so nobody can promise a price until buyers have seen a description.
Who owns code written by contractors?
Under UK law, a contractor usually keeps the copyright in what they write unless the contract says otherwise. Check your contracts for a written assignment before you license any code they wrote.
Do buyers need our whole repository?
No. You agree the scope: which repositories, which years and which parts. Third-party, open-source and client-owned code is usually listed and left out.
Sources
- Why Google bid $10 million for a failed airline's data (TIME, 25 August 2026)
- AI labs are buying data from dead startups to train their models (MIT Technology Review, 13 October 2026)
- What fetches top dollar on the dead startup data marketplace? (Upstarts Media, 3 September 2026)
- Shuttered startups are selling old Slack chats and emails to AI companies (Fast Company, 17 April 2026, reporting Forbes)
- DataVendor: estimate your codebase
- Mercor: data
- SimpleClosure AssetHub
- Turing Project Lazarus
- Replay: licensing operating data
- Labelbox Prism
- Copyright, Designs and Patents Act 1988, section 11
- Ownership of copyright works (Intellectual Property Office, GOV.UK)
- The State of Secrets Sprawl 2026: 9 takeaways for CISOs (The Hacker News, 30 March 2026, summarising GitGuardian)
- Export controls: dual-use items, software and technology (GOV.UK)
- Insolvency Act 1986, Schedule 4 (powers of a liquidator)
- Insolvency Act 1986, Schedule 1 (powers of an administrator)
