Deep article

Agencies and Freelancers: Which Old Code You Can Sell, and Which You Cannot

Agencies and freelancers can usually sell the code of their own products and internal tools, and sometimes reusable components they kept the rights to. Client work is different. If a contract assigned the code to the client, or you have no clear rights, it is not yours to sell. The answer sits in your old contracts.

5 min readPublished October 11, 2026By Alex Drew, Founder and CEO, Odys Global

Most agencies and freelancers hold more code than they realize, but only some of it is theirs to sell. The rule of thumb is simple: code you built for yourself is usually yours; code you built for a client usually is not, unless the contract clearly left the rights with you. Between those two sit internal tools and reusable components, where the answer depends on the wording of old contracts. This guide shows how to sort your repositories into four groups and what to check for each.

This is general information, not legal advice. Contract wording and local law decide ownership. Ask a qualified lawyer to confirm anything you are unsure about.

Which agency code is usually sellable?

Sort your repositories into four groups before anything else.

Group Examples Usually sellable? Main check
Own products A SaaS the agency launched, a plugin, an app, a booking platform Yes (to us, once it makes no money) Contractors assigned their work; no client funded it
Internal tools Project dashboards, reporting tools, deployment tooling, internal admin panels Often Built on agency time and budget, contains no client data
Reusable components UI kits, integrations, modules reused across clients Sometimes Contracts kept background IP with the agency
Client work Websites, apps and platforms built for and paid by clients Usually not Contract assigned rights to the client

Agencies often build their own products between client projects: a scheduling app, a niche marketplace, a white-label platform. Many never took off. That is the most common sellable asset in an agency, and our situation page for agencies with their own products explains what such code is typically still worth.

Why is client work usually off the table?

Most client contracts assign the code to the client, either on delivery or on final payment. Once that happens, the client owns the copyright, and selling it would mean selling something that belongs to someone else. Even where the contract is silent, the client typically holds at least a license to use what it paid for, and confidentiality clauses may forbid sharing the code at all.

There is a legal wrinkle worth knowing. In the US, code from an outside contractor is usually not a work made for hire by default: commissioned work only qualifies in nine listed categories with a signed agreement, and software is not one of them. A transfer of copyright also needs a signed writing. So a freelancer without a written assignment may technically still hold the copyright in client code. That does not make it safe to sell. The client may have an implied license, confidentiality duties may apply, and the code will often contain the client’s business logic, brand and data.

That is why The Blue Ocean Code passes on client work the seller has no rights to. It is not worth the risk for either side.

How do you read an old client contract?

Pull out every signed contract, statement of work and terms of business, then look for these clauses:

  1. Assignment of intellectual property. Words like “assigns”, “all right, title and interest” or “vests in the client on payment”. If present, the client owns the deliverables.
  2. Pre-existing or background IP. A clause saying the agency keeps rights to tools, libraries and know-how it brought to the project, and grants the client a license. This is what can make reusable components yours.
  3. License instead of assignment. Some agencies only license the code to clients. Then the agency may still own it, subject to the license.
  4. Confidentiality. Even code you own can be restricted if it contains the client’s confidential information.
  5. Exclusivity or non-compete terms. Rare, but they can limit what you do with similar code.

Our guide on who owns the code explains employee, contractor and agency ownership in more depth, including the UK and EU rules.

What about reusable components and internal tools?

These sit in the middle, and they are often the most interesting assets an agency has. A component library refined across twenty projects, or an internal reporting tool used every day for five years, reflects a lot of real engineering.

They are more likely to be yours if:

  • They were built on agency time and budget, not billed to a single client.
  • Your contracts kept background IP with the agency.
  • They contain no client names, data, credentials or business logic.
  • Freelancers who worked on them signed an IP assignment to the agency.

Strip anything client-specific before you describe them to a buyer: example configs with client domains, fixtures with real customer records, environment files with keys. Our guide to personal data in old code lists where it usually hides.

On their own, small utilities may be too thin to sell. A complete product or a substantial toolset usually fits better than a folder of snippets.

Does open source in agency code cause problems?

Not usually. Agency projects lean heavily on open-source frameworks, themes and packages, and that is normal. Black Duck found open source in 98% of commercial codebases it audited for its 2026 report. What you sell is the code your team wrote; third-party code stays under its own license, and its notices stay in place. Our guide to open source inside your codebase explains permissive and copyleft licenses in plain English.

What does matter is the share of original work. A WordPress site that is mostly a purchased theme and plugins has little original code. A custom platform built on a framework has a lot.

What does a buyer of agency code look for?

The buyer at The Blue Ocean Code is Odys AI Labs, the research and development arm of Odys, which uses code it buys for AI training and R&D; we may also work on it with research partners. It looks for complete products written by your own team, with history, docs and tests where they exist, owned by you or by the agency you can sign for. It passes on software still making money, client work you have no rights to, templates and tutorial projects, and repos that are mostly copied libraries or generated code.

Terms are cash only, one agreed price, paid on transfer, after review and with no obligation. No code changes hands before a signed written agreement, and we never ask anyone to install or run anything. Secrets, keys and personal data are removed before transfer, and we help; we never take databases, user records or customer data. We never use your agency’s brand or name or relaunch the product as yours, the agreement sets out exactly what rights transfer, and the deal stays confidential, which matters if you would rather clients did not hear about it. Our methodology page lists what we check.

What to do next

  • List every repository and tag it as own product, internal tool, reusable component or client work.
  • For anything outside “own product”, find the contract and read the assignment and background IP clauses.
  • For your own products and clear internal tools, send us a few details for a free code valuation, or run the free code value check first.

Frequently asked questions

Can an agency sell the code of a product it built for itself?

Usually yes. A product your agency designed, built and ran for its own account, with your own staff or properly assigned contractors, belongs to the agency like any other asset. If it no longer makes money, it can typically be sold for cash after review. Check that no client funded it under terms that gave them rights, and that freelancers who helped signed assignments.

I am a freelancer and my contract never mentioned IP. Do I own the client code?

Possibly, in the US at least, because code from an outside contractor is usually not work made for hire by default and transfers need a signed writing. But the client may have an implied license, and your contract may contain confidentiality terms. Treat this as uncertain, do not sell or share it on your own reading, and ask a lawyer; this is not legal advice. Most buyers, including us, pass on unclear client work.

Can I sell a reusable component library I used across client projects?

Sometimes. Many agency contracts keep pre-existing or background IP with the agency and give the client a license to use it. If your contracts did that, the library may be yours to sell, as long as it was built on your own time and budget. A component library alone may be too small; it usually fits best as part of a complete product or toolset.

Do I need to tell former clients if I sell my own agency's products?

Generally no, if the code is genuinely yours and contains nothing from their projects, no client names, data or keys. If a component was built on a client's budget, or a contract requires notice or consent, the answer changes. Read the contract, remove anything client-specific, and ask a lawyer where the wording is unclear.

Your next move

Find out what your old code is worth right now.

Tell us about the product in about a minute. No code needed. We review the details and come back with a cash offer or a plain no.

Get my free code valuation →
About 60 secondsContract before any code100% confidential

Owner situations

Value my code →