Twitter has filed for its long-awaited initial public offering, revealing a fast-growing company but one that lost money in each of the past three years.

A comparison of key Facebook and Twitter financial and user information at the time of Twitter's IPO filing.

Twitter generated $317 million in revenue last year, almost three times what it made in 2011, according to its IPO documents filed Thursday. Its loss last year was roughly $79 million, but that was smaller than its loss of $128 million in 2011.

The company hopes to raise $1 billion by selling its shares on the public markets, which would make it the biggest social media IPO since Facebook went public last year.

The figures were revealed in Twitter's S-1 form filed Thursday with the U.S. Securities and Exchange Commission. Companies are required to disclose financials and other sensitive data when they go public, and the documents give the first look at how Twitter performs as a business.

Eighty-five percent of Twitter's sales were generated through advertising in 2012, the documents show.

Twitter doesn't seem to have trouble making money from mobile, which was a big problem for Facebook and initially dragged down its performance as a public company. In the first six months this year, three-quarters of Twitter's "average monthly active users" accessed the service from a mobile device, and more than 65% of its advertising revenue was generated from mobile, Twitter said in the filing.

Twitter has steadily boosted its number of users since it was founded in 2006 by Jack Dorsey, Biz Stone and Evan Williams. In the three months ended June 30 this year it had about 218 million monthly active users, up from 151 million during the same period last year.

The amount Twitter hopes to raise is significantly lower than the $5 billion Facebook sought in its IPO last year. Twitter's IPO comes at a different stage in its growth, however. Facebook, which now has more than 1 billion monthly active users, already had 845 million users when it went public -- much higher than Twitter's 218 million. Facebook also reported higher revenue of $3.71 billion when it filed to go public.

Twitter has grown to become one of Facebook's biggest rivals, though the services offered by the companies are different. While Facebook is primarily a platform for connecting with friends and associates, Twitter functions more like a publishing tool. They overlap in many areas, however, such as allowing people to upload and share photos and videos.

The additional cash gained from an IPO could help Twitter aggressively expand its business and make across-the-board investments in hiring, operations and acquisitions, analysts said ahead of the IPO.

Twitter said it would use its IPO proceeds for working capital, acquisitions and other general corporate purposes.

Some hurdles stand in its way, however. The ability to continually grow its user base and advertising were cited as prominent risk factors in Twitter's filing. Generating a strong revenue stream on mobile in particular is critical for Twitter, given that 75% of its users accessed the site on a mobile device in the three months ended June 30, 2013, according to the filing.

A Twitter IPO had been expected for some time. The company revealed via tweet on Sept. 12 that it had filed plans for an IPO. But the initial filing was submitted confidentially to the SEC under the JOBS Act, giving Twitter a chance to prepare its paperwork away from the public eye. With the filing now public, Twitter must wait 21 days to begin its "road show" to seek funding from investors.

Twitter said it will list its shares on the Nasdaq Global Select Market or the New York Stock Exchange, suggesting it's not committing yet to one market or the other. Facebook went public on the Nasdaq, which was subsequently sued over problems it had on the first day of Facebook's trading.