For the better part of a year, Twitter has been trying to rebrand itself as a safe place for healthy conversations — rather than a social network rife with bullying and racism. But its latest advertising campaign, one that involves stenciling city sidewalks with users’ tweets, might brand the site as a scofflaw instead.

Earlier this week, Twitter users started posting pictures of the stencils popping up around the downtown corridor, part of the campaign running in San Francisco and New York through early October. Some were strategically placed. “Twitter is like running up the down escalator,” said one, neatly sprayed in front of an escalator leading to a BART station. “Twitter is garbage and I am a raccoon,” said another near a trash can.

Apt or not, the stencils, created using a spray-paint-like chalk, are illegal, according to Rachel Gordon, spokeswoman for the Department of Public Works.

“That’s not the use of the sidewalks,” she said. “We can go and document them. If they don’t remove them immediately, we’ll send a crew to remove them and charge them.”

Gordon added, “Our sidewalks are not to be used for commercial billboards. Twitter has the resources to use appropriate venues to advertise their company.”

The stencils were part of a larger advertising campaign that began Monday in San Francisco and New York City and included wrapping the Powell Street BART Station in yet more tweets. Twitter hired Cutwater SF, a media agency that has also done work for Google and Peet’s Coffee, to run it. (The campaign in New York City also involved sidewalk stencils, although officials there weren’t certain whether they, too, violated city policy.)

“Twitter is a roller coaster.”

“Twitter is just the comment section for life tbh.”

“Twitter is the world’s stream of consciousness.”

The ad campaign covers the Powell station’s many billboards and wraps around its pillars. These sorts of campaigns, which generally run for a month, cost $236,000 with an additional $85,000 for production costs, according to Outfront Media, the firm that handles BART advertising.

And now the campaign may end up costing even more. Twitter could end up paying $100,000 or more in fees and fines if the city attorney gets involved, Gordon said. There were no plans, however, to send maintenance crews scouring the streets for tweets. A spokesman for the city attorney’s office had no comment.

This is hardly the first time an advertising campaign has turned to the sidewalks for free billboard space. In September 2015, business consultancy Bluewolf covered the sidewalks around Moscone Center with its corporate logo. (Gordon said at the time that campaign was illegal, too.) A few months later, graffiti advertising Justin Bieber’s “Promise” album popped up all over Mission District sidewalks.

Twitter spokeswoman Siobhan Murphy defended the stencils. “There are chalk tweets around our offices in NYC and SF (as you likely know, our SF HQ is in the Tenderloin),” she wrote in an email.

Her statement was inaccurate on two counts. First off, Twitter’s headquarters is located in San Francisco’s Mid-Market neighborhood, at 10th and Market streets. And the stencils stretched well beyond the sidewalks immediately around the headquarters.

About five blocks away, at the corner of Mason and Eddy streets, a tweet was sprayed at the foot of a rusted fire hydrant: “Twitter is the definition of drinking from a firehose.”

A hose may be in order if the city decides to rid itself of the tweets. Spray chalk, according to manufacturers’ websites, is harder to remove than regular chalk. Erasing the ads may call for a concentrated spray of water, light brushing and sometimes household cleaners. It all adds up: The city spends more than $20 million a year on graffiti removal, according to the Public Works Department.

Twitter’s Murphy said the company had consulted with the San Francisco Arts Commission about the stencils. But Kate Patterson, the commission’s spokeswoman, said that isn’t true. The commission did not offer any kind of approval for the stencils, Patterson said.

Nor would it have: The Arts Commission has no oversight of or involvement in the regulation of advertising campaigns. It was not clear why Twitter would seek its advice.

Charlie Gray, one of the first Twitter users to post about the stencils, called ads at the BART “an assault on the senses.” But it was the street stencils, particularly in the Tenderloin, that were a step too far for Gray.

“It just makes me really angry that they would do this in that particular neighborhood. Not on Powell Street, but on Taylor Street, right next to support centers for homeless people and transgender people,” Gray said. “What really stands out to me is Twitter’s intense aversion to paying their fair share … while literally graffiti-ing our public sidewalks.” Twitter was among the companies that benefited from a recently ended tax break for companies that located in the Mid-Market neighborhood.

One of the graffitied messages — “Let me hear you say Twitter is bananas, B-A-N-A-N-A-S!” — came from Monty Estes, a user in Knoxville, Tenn. After an official Twitter account contacted him, he gave the company permission to use any of his tweets, although he didn’t realize they’d be showing up on the sidewalks of San Francisco and New York City. “They actually contacted me yesterday asking if they could send me a gift, but I have no idea what it is,” he said in a text message.

I just hope @gwenstefani doesn’t get mad that I borrowed some lyrics.

Thanks @Twitter & @TwitterNYC for displaying my tweet on the sidewalk. pic.twitter.com/FZPECdJaF6 — Vanilla Rice (@The_Fool_Monty) September 9, 2019

As for the tweet the company chose — it was a reference to Gwen Stefani’s song “Hollaback Girl,” and Estes said he didn’t exactly mean it in a good way.

“At the time I was watching people mean-tweet at each other over something ridiculous.”

Ryan Kost is a San Francisco Chronicle staff writer. Email: rkost@sfchronicle.com Twitter: @RyanKost