It’s lunchtime in San Francisco’s Mid-Market neighborhood, and only a few people are trickling in and out of the local food joints. A bar and restaurant on Ninth Street has rows of empty tables, while only about six people sit inside the Perennial, where a renowned San Francisco chef was recently hired to oversee lunch.

But inside the surrounding office buildings that house tech companies Twitter, Uber and Square, there are thousands of employees sequestered in private company cafeterias, where the food is free.

“And you can’t compete with free,” said Gwyneth Borden, executive director of the Golden Gate Restaurant Association.

In an attempt to attract employees to local restaurants and businesses, Supervisors Ahsha Safaí and Aaron Peskin are co-sponsoring an ordinance that would ban “employee cafeterias” from new office buildings in the city. This comes as local retailers, particularly those downtown, complain of a drop in business as more companies offer their workers meals in private corporate cafeterias, Safaí said.

“This is another way to help support small businesses,” he said.

An “employee cafeteria” is defined in the San Francisco health code as a space inside an office where employees are provided or sold tax-free food on a regular basis. These facilities are either operated by company employees or contractors. There are currently 51 such cafeterias around the city, Safaí said.

The supervisors’ proposal would put the city at odds with the tech industry, which largely views free food as an essential perk to lure talent.

Companies like Google, Facebook and Square have full-blown cafeterias, where employees are provided everything from fresh-made omelets to hand-rolled sushi. While some make it a point to source their food from local companies, Safaí said that wouldn’t matter under this proposal.

“This is also about a cultural shift,” he said. “We don’t want employees biking or driving into their office, staying there all day long and going home. This is about getting people out of their office, interacting with the community and adding to the vibrancy of the community.”

Square and Uber declined to comment, while Twitter could not be reached Tuesday afternoon.

When Square, a payment processing company located in Mid-Market, closes its employee cafeteria every other Friday, Corridor, a nearby restaurant, experiences such a dramatic uptick in business that it sometimes has to increase its staffing, said Ryan Cole, partner and CEO of Hi Neighbor Restaurant Group, which manages Corridor. But other days, he said, the restaurant sees very little foot traffic.

Anthony Myint, co-owner of the Perennial, said he was drawn to opening a restaurant in the neighborhood because of the number of companies — and, potentially, customers — that he thought would flood the streets at lunchtime. While he knew about the private cafeterias, he said he didn’t think they would impact his business this much. On an average day, he said, he sees only a handful of people during lunch.

“We misunderstood the pervasiveness of the company’s cafeterias inside,” he said, adding that he likely would have chosen another neighborhood had he known the extent of the problem.

Companies and startups would be able to get around the ordinance by using catering companies to deliver to their offices at lunchtime. Some of those catering companies, including Zesty, ZeroCater and Eat Club, source from local restaurants and deliver individual or family-style meals.

Eat Club, for example, serves “hundreds” of companies in San Francisco, from public tech companies to small startups, said founder Rodrigo Santibáñez. Many of his clients choose Eat Club, which buys from local suppliers, because it improves productivity and collaboration when employees eat together.

“Food in the workplace plays an important role,” Santibáñez said. “All of that helps company culture, and it also helps companies create an attractive environment.”

The ordinance wouldn’t apply retroactively to companies that now have cafeterias, but instead to new construction — such as the roughly 7 million square feet of new office space proposed under the Central SoMa Plan that will soon go before the Board of Supervisors.

In a similar effort, Mountain View barred companies from providing employees with fully subsidized meals inside a new office development.

Given how ingrained employee cafeterias have become in modern tech company culture, Peskin said he is aware that this proposal may be controversial. But, he said, this is a “groundbreaking” piece of legislation that will benefit the restaurant industry and city overall.

“The historic model is that people would go to work, and then flow outside during lunch. And in recent times it has been much more inward facing, where companies don’t want their workers to leave,” he said. “The idea here is to bolster, not only the restaurant business, but other ground-floor retail businesses that are suffering.”

Trisha Thadani is a San Francisco Chronicle staff writer. Email: tthadani@sfchronicle.com Twitter: @TrishaThadani