Twitter has posted better-than-expected first-quarter revenue and a surprise rise in the number of monthly active users, a sign that the social media platform may be on a sustainable path after a year of stagnant user growth.

The company's quarterly monthly active user count rose 9 million to reach 330 million from previous quarter, while analysts on average had expected 318.8 million, a loss of 2.2 million users, according to IBES data from Refinitiv.

Twitter, which has been focusing on improving the quality of its platform by removing thousands of spam and suspicious accounts, said it would no longer disclose MAUs from next quarter.

Instead, it plans to only provide the number of "monetisable" daily active users, a metric the company created to measure only users exposed to advertising on a daily basis.

Monetisable daily active users or mDAU rose to 134 million in the first quarter, up 12% from a year ago, Twitter said.

For the first quarter of 2019, Twitter's revenue rose 18% from a year ago to $787m, surpassing Wall Street expectations of $776.1 million.

Revenue was boosted by ad sales that also jumped 18% to $679m. In the United States, ad revenue rose by 26% year-on-year, thanks to its video ad formats that continued to show strength in 2019.

However, it forecast current quarter revenue largely below Wall Street targets. Twitter expects revenue to reach between $770m and $830m, compared with $819.5m estimated by analysts polled by Refinitiv.

Twitter also sees more operating costs as it cleans up its platform to minimise abusive user behavior.

"We are now removing 2.5x more Tweets that share personal information and 38% of abusive Tweets that are taken down every week are being proactively detected by machine learning models," CEO Jack Dorsey said in a statement.

Total operating expense including cost of revenue, rose by 18% to $693m from the first quarter a year ago.

Twitter reported quarterly profit of $191m, or 25 cents a share, compared with $61m, or 8 cents per share,a year earlier.

Excluding a $124.4m tax benefit, the company earned 9 cents per share.