Companies outside the technology sector are stepping into the software market, selling digital tools developed by their own information-technology teams to other businesses, with some firms even spinning off technology units.

The strategy points to the changing role of chief information officers, from overseeing back-office technology to generating revenue, IT managers and industry analysts say.

“Senior executives are being pressed harder across the board to find new revenue opportunities and CIOs who find ways to develop these streams are in high demand,” said Mike Pino, a partner at PricewaterhouseCoopers LLP.

Newsletter Sign-up CIO Journal The Morning Download delivers daily insights and news on business technology from the CIO Journal team. PREVIEW

Fasken Martineau DuMoulin LLP, a Toronto-based law firm known as Fasken that has offices in Canada, the U.K., South Africa and China, in May launched a spinoff venture to market and sell its artificial-intelligence platform, among other tech tools.

The platform was developed in house over the past two years to automate a range of law office tasks, such as proofreading legal documents and searching for precedent cases.

The goal is to “automate as many tasks as possible for lawyers,” said Mark Bowman, a counsel in the firm’s corporate, commercial, privacy and cybersecurity practices who leads the new initiative, Meese AI. Mr. Bowman said his previous work as a software engineer helped him come up with the business, which plans to sell its products to Fasken clients, largely other law firms.

“From our perspective we have a tool internally that worked well for ourselves, and saw the benefit right away” of selling it outside the firm, said Peter Feldberg, the firm’s managing partner.

Other companies to spin out businesses from internal tech efforts include Choice Hotels International Inc., which offers a cloud-based reservation system for hoteliers, and electronics maker Celestica Inc., which sells cloud-based supply-chain services to other manufacturers.

While the basic strategy isn’t new— Amazon.com Inc. was an online bookstore long before it became a tech industry powerhouse—it appears to be occurring more often, said Nigel Fenwick, a vice president and principal analyst serving e-business and channel strategy professionals at Forrester Research.

As key drivers, he cites the rapid growth of cloud computing and digital capabilities that have made it easier for retailers, real-estate brokerages, law firms and other businesses to create high-quality customized software.

Success is far from assured, however, said John Lovelock, a distinguished vice president and analyst at research firm Gartner Inc.

“Selling tech takes a certain approach to selling, marketing and cash that traditional enterprises lack,” he said. Above all, Mr. Lovelock cautions firms outside the tech industry not to become “overly enamored with something cool they developed for themselves” and tempted to sell it on the open market.

Craig Stephenson, managing director of Korn Ferry’s North America CIO/CTO division, said a key mistake companies make is underestimating competition from giants such as Microsoft Corp. , Oracle Corp. and others.

Still, major players in their own industries have the advantage of a ready-made market, selling technology to their customers.

Chicago-based Jones Lang LaSalle Inc., one of the world’s largest commercial real-estate services firms with more than $16 billion in annual revenue, last month announced plans to sell an AI-powered smartphone app that allows workers to set up meetings, locate colleagues, book a conference room, look up lunch menus and other routine office services.

The app, set to be released this year, was built using workplace data from some 500,000 employees in offices spread across 554 million square feet of properties managed by JLL. The app can be used by workers at any company, not just those with offices in JLL’s buildings.

“Many of our customers are trying to build in-house solutions, but they don’t want to be a software firm,” said Vinay Goel, JLL’s chief digital product officer. “As we’re building products we lean on their expertise and know the customers’ pain points and can provide solutions.”

JLL’s digital services and products contribute about $100 million annually in direct revenue, the company said.

Write to Angus Loten at angus.loten@wsj.com