Facebook is working on incorporating the hashtag, one of Twitter's most iconic markers, into its service by using the symbol as a way to group conversations, said people familiar with the matter. It is unclear how far along Facebook's work on the hashtag is and the feature isn't likely to be introduced imminently, these people said.

On short-messaging service Twitter, the hashtag—a word or phrase preceded by the "#" pound symbol—is a way for people to collate many Twitter messages about a single news event or topic, like the selection of the Pope (#PopeFrancis). The hashtag is closely associated with Twitter, and fans of the service use the hashtag as short-form creative expression.

Facebook is testing whether to follow Twitter's lead and allow users to click on a hashtag to pull up all posts about similar topics or events so it can quickly index conversations around trending topics and build those conversations up, giving users more reason to stay logged in and see more ads. Instagram, which Facebook acquired last year, already uses hashtags, allowing users to sort photos by the symbol.

Facebook's work on a hashtag is a sign of the heightening battle between Facebook and Twitter, as both compete for mobile users and fight for advertising dollars. For years, Twitter and Facebook seemed to occupy different poles of the social-media spectrum. While Facebook was the home of close friends and family, Twitter was the real-time broadcasting device for the rest of the world.

Facebook has now increasingly moved onto Twitter's turf. The Menlo Park, Calif., social network is prodding users to share more content with the public. In recent years it has mirrored some of Twitter's features by creating "subscriber" lists for users, and allowing people to tag celebrities and brands with the "@" sign.

Earlier this month, Facebook unveiled a simplified website redesign. Facebook Chief Executive Mark Zuckerberg said Facebook was building the foundation to be the best "personalized newspaper" for users, an ambition Twitter has also expressed by working closely with publishers and improving its news-surfacing engine. Facebook, which also recently revamped its search engine, has also said it plans to make public posts searchable in the future.

ENLARGE

Mark Zuckerberg

And while closely held Twitter is a fraction of Facebook's size, it is competing with Facebook for mobile and online advertisers, especially as some advertisers flock to Twitter to advertise against real-time moments. Twitter has bulked up its sales staff and released more advertiser-friendly products. Last month, Twitter opened its ads platform to third-party partners so that advertisers do not have to directly buy ads from Twitter.

"Historically, Facebook has come first for advertisers and Twitter has been a nice add-on," said Debbie Williamson, an analyst for eMarketer. "Twitter has been more aggressive."

Twitter is expected to make about half a billion dollars in advertising revenue this year, according to eMarketer. Facebook generated $4.3 billion last year from advertising.

The gap is narrower in mobile advertising, where Twitter is expected to make $249 million this year, versus Facebook's $851 million, according to eMarketer.

Twitter users came up with the hashtag more than five years ago as a way for people to collect tweets on a favorite topic, like a news event or interest groups. Hashtags also have morphed into shorthands for cultural memes, helping to catapult Twitter into the public eye. For example, commentary about actor Charlie Sheen's 2011 publicity campaign against his bosses from the television series "Two and Half Men" was commonly appended with the hashtag "#winning."

The hashtag also plays a key role in Twitter's moneymaking efforts. The San Francisco startup encourages companies like Coca-Cola Co. and General Electric Co. to invent hashtags as a secondary brand for their marketing messages both on Twitter and in other types of marketing.

Twitter last month said half of the 52 national TV commercials that aired during the Super Bowl included a hashtag in the ad. For example, Paramount Farms Inc.'s Wonderful Pistachios brand created the hashtag #CrackinStyle and flashed it on screen during its Super Bowl ad featuring Psy, the singer behind the "Gangnam Style" viral online video.

This copy is for your personal, non-commercial use only. Distribution and use of this material are governed by our Subscriber Agreement and by copyright law. For non-personal use or to order multiple copies, please contact Dow Jones Reprints at 1-800-843-0008 or visit www.djreprints.com.