The number of subscribers grew 12 percent to 246 million, or one million more than expected, the company said in an earnings statement.
The streaming platform had 626 million active users during the quarter, lower than its forecast of 631 million.
Spotify's operating profit reached 266 million euros ($289 million) in the second quarter, compared to a loss of 247 million euros in the same three-month period last year.
"It's an exciting time at Spotify. We keep on innovating and showing that we aren't just a great product, but increasingly also a great business," chief executive Daniel Ek said in a statement.
"We are doing so on a timeline that has exceeded even our own expectations. This all bodes very well for the future," he added.
Spotify increased its subscription prices in June, the second increase in a year.
The improved operating profit is also due to lower spending on marketing and staff, the New York-listed company said.
"Our business continued to perform well in Q2, led by healthy subscriber gains, improved monetization and record profitability," Spotify said in its earnings report.