San Francisco is home to some of fashion’s biggest names: Levi Strauss & Co., Gap and Old Navy.

But in three neighborhoods — North Beach, Chinatown and Hayes Valley — those local companies are banned from opening new stores.

That’s because the city forbids chains, defined as having more than 11 locations globally, in those areas. The bans were passed starting in 2004, after residents fought the encroachment of large corporations into neighborhood retail districts. Other areas require additional permits for such stores, also known as formula retail.

Chain store bans may hinder the city’s ability to adapt to changing consumer tastes, said Karen Chapple, a UC Berkeley regional planning professor.

“Zoning ordinances are really inflexible in terms of types of uses and become out of date when demand for the types of spaces wanted is ignored,” Chapple said.

But supporters say the restrictions preserve the eclectic streets, preventing San Francisco from looking like every other city.

The formula retail ban helps protect smaller retailers by keeping rents down and blocking deep-pocketed corporations from invading, said Kathleen Dooley, a commissioner at the city’s Office of Small Business.

Dooley, who ran a North Beach store called Columbine Floral Design from 1985 to 2005, said allowing chain stores that can pay twice as much rent can devastate small businesses.

Being creative and filling a consumer niche, rather than bringing in an existing brand, is the path to success, she said.

“Nowadays, you can’t just put any old thing into brick and mortar,” she said, citing North Beach’s Cole Hardware and Al’s Attire as successes. “You have to be smart. You have to make it a destination.”

Chain store bans are rare. Nantucket, Mass., banned downtown chains in 2006. Jersey City, N.J., recently repealed 2015 chain store restrictions after a developer sued the city.

Some say the ban makes it even more challenging to fill the dozens of empty storefronts, especially in North Beach, which saw the city’s biggest spike in vacancies last year. More than a fifth of storefronts in the area are shuttered.

Edward Schmitt of EMJ Capital is trying to lease a North Beach restaurant space inside a new condo building at 601 Columbus Ave.

The space is 4,700 square feet and rent is $25,000 a month, with a five-year minimum commitment, making it one of the largest and most expensive listings in the area.

Schmitt said multiple chain restaurants had expressed interest but aren’t allowed in North Beach.

“They’re so strict in that area,” said Schmitt. “That limits you quite a bit.”

National and global chain stores are better able to survive San Francisco’s lengthy permitting process and high construction costs, he said. In contrast, first-time business operators and local stores have fewer financial resources, and don’t necessarily have the name recognition to draw a crowd compared with a chain.

“It’s very difficult to bring in a brand-new, non-marketed name to a space of that magnitude and size in North Beach,” Schmitt said. “You’re going to need quite a financial backing to take the beating of the first year or two.”

The developer has spent almost $1 million in construction costs for infrastructure like gas, electrical, water, exhaust hood, floor drains, grease traps. Building out a restaurant could take as much as $2 million more — a big hurdle for a small operator — he said.

Schmitt said more than 50 prospective tenants have toured the space. “That’s why we’re being so selective and choosy,” Schmitt said. “It’s the only brand new building in North Beach.”

Coincidentally, the building that Schmitt is marketing, which is branded the Palace at Washington Square, was previously the site of a battle over a chain store.

The site was previously the Pagoda Palace movie theater, which opened in the 1900s but closed in 1994.

In 1998, future Supervisor Aaron Peskin and other North Beach residents successfully fought off a Rite Aid pharmacy chain store that wanted to open in the empty theater. Rite Aid abandoned the plan in the face of opponents who didn’t want a big corporate drugstore, and the building stayed vacant for nearly two decades before it was demolished and eventually replaced by the new condos.

As a supervisor, Peskin helped pass a formula retail ban in North Beach in 2005 with broad local support. Some existing tenants like Bank of America were grandfathered in and allowed to stay.

There is no statistical evidence that shows the formula retail ban is causing vacancies, Peskin said. The ban continues to have strong support, he said.

Only 28% of 245 North Beach residents favored revising the chain store ban in a recent survey about how to help small businesses distributed by community group North Beach Neighbors. But 70% said they’d be open to easing restrictions for a Bay Area company with multiple locations.

Danny Sauter, North Beach Neighbors president, said he thinks North Beach’s shops can thrive with a chain store ban.

Chinatown, where chain stores are also banned, has an 11% retail vacancy rate. That’s right around the city average, according to a city survey.

Hayes Valley has a chain store ban, but it is booming and filled with new restaurants and shops, including trendy brands like glasses retailer Warby Parker and shoemaker Allbirds, which is opening soon. Warby Parker opened in 2014 and narrowly missed chain store status. Its Hayes Valley shop was its 11th worldwide location, so it didn’t count as a chain, though it now has almost 100 locations. Allbirds, which is headquartered in San Francisco, has six other locations.

Pamela Mendelsohn, a partner at retail brokerage Maven Commercial, said Hayes Valley has benefited from proximity to City Hall and tech company offices and a central location with abundant transit. It also has multiple new housing projects, which increase foot traffic.

Real estate professionals and residents say the city’s chain store policy is just one factor in a complex set of challenges facing retailers, who also struggle with high construction costs and lengthy permitting.

“It is a tough balance. You want to evolve with the times. You want to provide services, provide retail, provide experiences that are in demand right now,” Sauter said. “But you don’t want to lose the history. You don’t want to turn this into something that it isn’t. You’ve got to stay true to the history without going back in time.”

Chronicle staff writer Shwanika Narayan contributed to this report.

Roland Li is a Chronicle staff writer. Email: roland.li@sfchronicle.com Twitter: @rolandlisf