Zarlent

Can I sell or license legacy code (COBOL, Fortran, Visual Basic) to AI companies?

Yes. Buyers list legacy and specialist-language code (COBOL, Fortran and similar) as its own category, because little of it is public, and the published ceiling for a company of 15 to 5,000 staff is $250K–$500K. The government's own audit shows why: 8 of the 11 most critical federal legacy systems use outdated languages.

No buyer pays to be mentioned

What could your company's records earn? Get a range in 30 seconds. Free, no obligation.

Why do AI buyers want old code?

Models write plenty of Python and JavaScript because the public web is full of both. COBOL, Fortran, assembly and Visual Basic are scarce online, so models do them badly, and the people who can fix that are retiring. The US Government Accountability Office found 8 of the 11 federal legacy systems most in need of modernization use outdated languages. Both of the Treasury Department's selected systems run on COBOL and assembly language, "programming languages that have a dwindling number of people available with the skills needed to support them" (GAO-25-107795, 17 Jul 2025). Buyers want that code to teach models to read and convert it.

What do buyers ask for?

One buyer publishes a dedicated listing for legacy and specialist-language codebases, naming COBOL and Fortran, for companies with 15 to 5,000 staff and a ceiling of $250K–$500K (buyer listing, read 20 Nov 2026). It sits apart from common-language code, which tops out lower, at up to $250K for companies of 5 to 2,000 staff. The extra comes from scarcity.

Code typePublished ceiling bandCompany size
Common languages, productionup to $250K5 to 2,000 staff
Legacy and specialist languages$250K–$500K15 to 5,000 staff

Source: buyer listings, read 20 Nov 2026.

How is legacy code collected?

It depends where the code lives. Modern shops keep it in Git, which supports a full copy with history (GitHub Docs, "Backing up a repository"). Older shops often hold COBOL on a mainframe library, Fortran on a research server and Visual Basic in a shared drive or old version-control tool. Expect your engineers to export source files, job-control scripts and copybooks, plus the comments and any documentation. The comments often matter as much as the code. A buyer does not need to run it, only read it.

What gets removed or excluded?

  • Hardcoded passwords, connection strings and keys.
  • Customer records pasted into test files, which are common in mainframe test decks.
  • Code licensed to you by a vendor, which you cannot sublicense.
  • Code written by a contractor who kept the rights.
  • Programmer names in comments, replaced with placeholders.

For a bank, insurer or government contractor, also check whether the logic reveals security design. Your contracts may forbid sharing it.

Which industries hold the most legacy code?

Banks, insurers, airlines, utilities, government contractors, manufacturers with decades-old plant systems, and research labs and engineering firms running Fortran for simulation. Companies that survived mergers often hold several generations of code in different languages, which raises the value.

Questions

Is old code worth less?

For AI buyers it is often worth more, because it is rare and hard for models to learn elsewhere.

Do I need to explain the code to the buyer?

Documentation raises value but is not required. Offer comments, specs and sample inputs where they exist.

What if my vendor owns part of the system?

Leave that part out. Licensing code you do not own breaks your warranty in the contract (contract clauses). See the calculator for a range, or the general guide to selling source code.

Sources