Prove you own what you are selling
This is where most code sales fail. If contractors wrote part of the system without a written intellectual property assignment, they may still own their contributions. If an employee built the first version before incorporation, ownership may sit with them personally.
Open source licences matter too. Copyleft licensed components can impose obligations on anything distributed with them. Buyers will ask, so audit your dependency licences before listing rather than during diligence.
- Signed assignment from every contractor and employee who wrote code
- A dependency licence audit, particularly for copyleft components
- Clarity on who owns the repository, domain and cloud accounts today
- Confirmation that no code is subject to an investor or lender charge
Decide what is in the package
A codebase alone is worth less than a working system. What raises the price is everything that removes risk for the buyer, particularly proof that it runs and instructions for making it run.
Never publish the repository link on a public listing. Share it under an agreement once a buyer is genuinely engaged, because a public repository link is the one asset you cannot take back.
- Full repository with commit history, which shows how the system evolved
- Deployment configuration and infrastructure as code
- Architecture notes, environment variables and a runbook
- A list of known bugs and technical debt, stated openly
Price it against the build cost
The buyer's alternative is building it. Estimate the engineering months genuinely embedded in the system and apply a realistic rate. That gives a defensible ceiling, and codebases typically transact well below it, because the buyer is taking on risk and unfamiliarity.
Working, deployed and documented systems sit at the top of that range. Undocumented code with no running environment sits at the bottom, sometimes at a small fraction of build cost.
Hand it over safely
Transfer repository ownership, rotate every credential, move third party accounts deliberately rather than by sharing logins, and remove your own access on a defined date.
Agree the handover period in writing up front. Thirty days of reasonable availability for questions is a common and fair arrangement, and buyers will pay for it.
Common questions
How do I sell my startup code if the startup failed?
Confirm you own it, package the repository with documentation and deployment configuration, price against what it would cost to rebuild, and sell through a marketplace where buyers look for technology assets.
Should I show buyers the code before they pay?
Share it under a confidentiality agreement with serious buyers only, and never link a repository publicly.
What if contractors wrote some of the code?
Check for a written assignment of intellectual property. Without one they may retain rights, and buyers will treat that as a blocking issue.
How much is a startup codebase worth?
Usually a fraction of what it cost to build, driven mainly by whether it runs, whether it is documented, and whether anyone is available to explain it.