The original files of the source code for the World Wide Web were sold Wednesday as a nonfungible token, or NFT, for $5.4 million, the latest in a string of digital collectibles to fetch upward of a million dollars.

The files were sold in a Sotheby’s auction by Sir Tim Berners-Lee, who is known for inventing the World Wide Web application in 1989, which enabled users to generate and navigate links of content and files across a network of computers.

The NFT artwork called “This Changed Everything” also includes an animated visualization of the code as it was being written, a scalable vector graphics representation of the code with a graphic autograph by Mr. Berners-Lee and a digital letter written by him that reflected his thought process in creating the code.

The winning bidder hasn’t been identified. Mr. Berners-Lee’s sale ranks among the most valuable NFTs of digital artworks ever sold, according to Sotheby’s.

World Wide Web inventor Sir Tim Berners-Lee in London in 2018.

World Wide Web inventor Sir Tim Berners-Lee in London in 2018.

Photo: simon dawson/Reuters

NFTs are a kind of digital asset that work on the blockchain, similar to cryptocurrency such as bitcoin, and are unique tokens, each with their own identification that can’t be replicated. They can act as a digital certificate of authenticity for everything from works of art, sports collectibles to music albums.

The overall NFT market ballooned last year to at least $338 million from $141.6 million in 2019 and about $41 million in 2018, according to NFT sales-tracking website NonFungible.com and L’Atelier, a research firm affiliated with BNP Paribas SA .

This increased interest in NFTs was in part spurred by a flurry of buyer interest after Mike Winkelmann, a self-taught artist who goes by the professional name of Beeple, sold a digital image online at auction house Christie’s for $69.3 million, making him the third most-expensive living artist after Jeff Koons and David Hockney.

The Beeple bid set off an array of content creators that have set their sights on the NFT market in its wake. In March, Twitter Inc. Chief Executive Jack Dorsey auctioned off his first tweet to the site for $2.9 million.

Mr. Berners-Lee and his wife will use the proceeds from the sale to help causes they support, Sotheby’s said.

Write to Kimberly Chin at kimberly.chin@wsj.com