Yelp shares jumped after the online review website reported a better-than-expected profit.

The company's shares closed up 27 percent Thursday, a day after it posted second-quarter earnings-per-share of 12 cents versus the 1 cent Thomson Reuters consensus.

Yelp also reported sales of $235 million for the quarter versus Street expectations of $232 million. The company said in its shareholder letter its revenue exceeded their outlook due to "strength across Yelp's advertising business."

The company's second-quarter ad revenue rose 21 percent to $226 million.

J.P. Morgan analyst Doug Anmuth reiterated his overweight rating for Yelp shares, citing the company's strong earnings results.

"Strong 2Q … Home & local services ad revenue accelerated for the 3rd straight qtr as Request-A-Quote (RAQ) adoption & monetization remains strong," Anmuth said in the note to clients Thursday. "Yelp remains one of our top SMID-cap ideas as we believe the company has a significant opportunity ahead in the large & growing local ad market."

Yelp said the number of active devices using its app rose 15 percent year over year to more than 32 million.

The company's shares are down 9 percent this year through Wednesday versus the S&P 500's 7 percent gain.