The two-alarm fire was reported at about 3:45 a.m. at 1127 Clement St., between 12th and Funston avenues.
No one was injured in the blaze, which also caused some damage to three other buildings, but eight people were displaced, a fire department employee said.
Seventy-seven firefighters responded to the fire, which was controlled at about 5 a.m.
The fire department estimated that the blaze caused $500,000 in damage to the building where it started and destroyed $250,000 in contents.
However, Internet Archive founder Brewster Kahle said this morning that the loss was likely much greater.
"We think we've lost about $750,000 in digitizing equipment," he said.
Internet Archive is a free digital library created in 1996 that offers books, movies, music, archived web pages and other content. Kahle said the site has about 3 million daily users.
He said the building that was damaged was a scanning center where seven employees worked on "high-end digitizations of books, movies and microfilm."
Kahle said that although the damage is extensive, almost everything appears to be replaceable.
He said Internet Archive's headquarters is next door and that no data were lost in the fire. The organization has 30 scanning centers nationwide, and the other centers will absorb some of the work that was being done at the center that burned.
This morning, Kahle and other employees were taking stock of the damage.
"This is not what a librarian dreams of," he said.
The space that burned is a side office to a main building that was once a Christian Science church that opened in 1923, Kahle said.
The cause of the fire remains under investigation.
Internet Archive is accepting donations on its website at https://archive.org/donate/index.php.