SAN FRANCISCO -- Twitter reported surprisingly strong second-quarter user numbers and revenue Friday, as it works to make the platform more user-friendly and eliminate robotic and fake accounts on its platform.

On that front, the social media messaging service said instances of suspicious behaviour and spam dropped by 18% during the quarter.

But Twitter's push to cut down on fake accounts costs money, and its adjusted profit fell 36% to about $37 million, or 5 cents per share. At the same time, revenue surged 18%, to $841 million, better than the $829 million that Wall Street was looking for, according to a survey by FactSet. In April, Twitter had forecast revenue of $770 million to $830 million for the quarter.

Twitter's daily user base rose 14% to 139 million, an increase of 5 million users. Analysts were expecting 134.7 million daily users.

The revenue surge was due to higher advertising revenue. The company said it is on track to hire 20% more people than last year.

"The health first conversation is a way to continue to grow the audience, our revenue product and sales and platform," said CFO Ned Segal. "And so the head count growth is really thinking about all of those areas."

The San Francisco company started disclosing its daily user base earlier this year. These are users who log into the site at least once a day and see advertisements on the platform. This metric has replaced its monthly user number disclosures.

Segal said the user growth was broad-based, both in the U.S. and internationally, driven by the site's continued relevance in the national conversation.

"We look at this 14% year-over-year growth we delivered and we see the cumulative benefit of the last few years of work that we've done to improve the service to drive relevance to make Twitter more conversational, to make it easier to find the topic and events that people care about most," Segal said.

Twitter has been trying to improve what the company calls the "health" of conversations on its platform amid widespread criticism that it doesn't do enough to remove hate speech, abuse and harassment.

In a call with analysts, CEO Jack Dorsey said "health" remains the top priority.

"Health is a long-term growth factor for us, and we have been doubling our efforts to make sure that we can address all the issues that we're seeing on the service," he said. "A big focus for us over the past year has been to proactively identify content on Twitter that would violate our rules, so that we don't require a report."

In June, the company began placing warning labels on abusive and otherwise offending tweets by politicians and world leaders. Twitter has long argued that tweets from world leaders are in the public interest and should remain even if they violate the site's terms. This became an issue with the election of President Donald Trump, who routinely uses Twitter to disparage enemies and rile up supporters.

With the new feature, users have to tap through the warning to see the underlying message, but the tweet won't be removed, as Twitter might do with a regular person's posts.

Twitter has redesigned its website in an attempt to make it simpler to use and encourage exploration. People who use Twitter on a desktop computer rather than mobile tend to be the more serious users who tweet for work -- social media professionals, journalists and the like.

Twitter's shares jumped $3.66, or 9.6 per cent, to $41.76 in afternoon trading.