Taylor Swift
Singer Taylor Swift performs on ABC's "Good Morning America" to promote her new album "1989" in New York in October. Reuters

Spotify CEO Daniel Ek fired back at pop star Taylor Swift on Tuesday for pulling her music catalog off of the 20 million-song streaming service. In a blog post, Ek said Swift could have made $6 million this year if she hadn't taken all of her songs down last week.

The "Shake It Off" singer told Yahoo Music she thought Spotify was too big of an experiment to justify the risk. "I'm not willing to contribute my life's work to an experiment that I don't feel fairly compensates the writers, producers, artists and creators of this music," Swift said. "And I just don't agree with perpetuating the perception that music has no value and should be free."

But there's a difference between piracy and Spotify, Ek said in his blog post. Spotify has paid $2 billion to labels, publishers and collectors for distribution rights. "Piracy doesn’t pay artists a penny -- nothing, zilch, zero," Ek said. "Not all free music is created equal -- on Spotify, free music is supported by ads, and we pay for every play." He said he was frustrated to hear artists weren't seeing those profits, but that's a problem with the music industry, not his software.

Spotify, which launched in the United States in 2011, allows unlimited free listening for people who want to hear ads. It has 50 million active users, Ek said. But 12.5 million users subscribe for an ad-free service at $10 a month. "That’s three times more than the average paying music consumer spent in the past," he said.

Swift's fifth album "1989" sold nearly 1.3 million copies in the U.S. in its first week, garnering the most sales since Eminem's "The Eminem Show" in 2002. "We hope she sells a lot more because she’s an exceptional artist producing great music," Ek said. "In the old days, multiple artists sold multiple millions every year. That just doesn’t happen anymore; people’s listening habits have changed -- and they’re not going to change back."

Spotify's goals are the same as artists, Ek said, name-checking successful promotions with musicians such as Lana Del Rey and alt-J. If albums aren't available for free on Spotify, people will seek them out illegally on sites such as The Pirate Bay. Basically, he said, Swift was wrong: "We're getting fans to pay for music again."