Why Are San Francisco Houses So Close Together?

San Francisco houses sit unusually close together because the city was platted into narrow 25-foot-wide lots during the Gold Rush era, built on a tight peninsula with limited land, and then rebuilt at high density after the 1906 earthquake destroyed much of the original housing stock. The result is block after block of row houses sharing walls with their neighbors, a pattern that became self-reinforcing through zoning codes that essentially locked in the original tight spacing.

The Gold Rush Created Tiny Lots

San Francisco’s population exploded from roughly 1,000 people in 1848 to over 25,000 just two years later when gold was discovered at Sutter’s Mill. Land speculators subdivided the city’s hills into the narrowest lots they could sell, typically 25 feet wide and 100 feet deep. The goal was simple: fit as many sellable parcels as possible into every block. Wider lots meant fewer sales.

Builders filled these lots with row houses, a style borrowed from East Coast cities like Philadelphia and Baltimore. Each home stretched from one side of its lot to the other, sharing a wall (called a party wall) with its neighbor on each side. Victorian-era row houses with their ornate facades became the city’s signature look, and the tight lot pattern meant that houses weren’t just close together. They were literally touching.

Geography Left No Room to Spread Out

San Francisco sits on the tip of a peninsula, bounded by the Pacific Ocean to the west, the San Francisco Bay to the east, and the Golden Gate strait to the north. The city covers just 47 square miles of land. Unlike Los Angeles, which could sprawl outward across a vast basin, San Francisco had fixed boundaries from the start. As demand for housing grew, the only option was to build more densely on the land available.

The city’s steep hills made this worse. Buildable, flat land was scarce, so the desirable blocks near downtown and along transit corridors filled up fast. Developers squeezed houses onto every available lot rather than leaving gaps between buildings, because open space between homes was a luxury the geography couldn’t afford.

The 1906 Earthquake Rebuilt the City the Same Way

The 1906 earthquake and the fires that followed destroyed roughly 28,000 buildings and left more than half the city’s residents homeless. You might expect that disaster to have triggered a dramatic rethinking of how tightly buildings were packed. It didn’t. According to a report from San Francisco’s Department of Building Inspection, “San Francisco was rebuilt in much the same way as before, with densely packed, flammable buildings.”

The homes that replaced the burned Victorians were mostly Edwardian in style, simpler and faster to build, but constructed on the same narrow lots with the same wall-to-wall footprints. In some neighborhoods, the more straightforward Edwardian design was specifically chosen because it was cheaper and quicker than recreating the elaborate Victorian woodwork that had been lost. The street grid and lot lines survived the earthquake, so the replacement buildings simply filled the same tight footprints.

Meaningful seismic building code improvements didn’t arrive until the mid-1930s, when the city banned new unreinforced masonry construction. And only about 16 percent of San Francisco’s total building area was constructed after the mid-1970s, when modern seismic safety standards took effect. That means the vast majority of the city’s housing reflects pre-modern building patterns where density was the default.

Zoning Codes Locked In the Pattern

San Francisco’s current planning code doesn’t require side setbacks in most residential districts. Front setbacks are based on the average of adjacent buildings, which means new construction has to roughly match the existing streetscape. If every house on a block sits five feet from the sidewalk with zero side gaps, any new building will follow the same pattern.

Rear yards are the one place the code creates breathing room. In single-family zones, buildings must leave at least 25 percent of the lot depth (no less than 15 feet) as a rear yard. In denser residential zones, rear yard requirements can reach 45 percent of lot depth, though reductions are allowed based on what neighboring buildings have done. This creates the characteristic San Francisco pattern: houses pressed tight against each other on the sides and front, with a small shared open space in the middle of each block behind the buildings.

Some higher-density districts, like RC-3 and RC-4, have no front setback requirement at all. Buildings in these zones can extend right to the property line on the street side, which is why certain San Francisco neighborhoods feel like solid walls of housing when you walk down the sidewalk.

Party Walls and Fire Safety

When two buildings share a wall or sit extremely close together, fire spreading between them becomes a serious concern. San Francisco’s building code addresses this through fire-resistance ratings that scale with how close a building sits to its lot line. If a building’s exterior wall is less than five feet from the property boundary, it needs the highest fire-resistance rating, up to three hours depending on the building type and what it’s used for. Walls that are 30 feet or more from the lot line can have no fire-resistance rating at all.

For shared party walls between row houses, the code requires fire-rated construction so that a fire in one home doesn’t immediately spread to the next. This is a direct lesson from the 1906 disaster, where wooden buildings packed tightly together created a firestorm that burned for three days. Modern row houses still touch each other, but the walls between them are engineered to contain a fire for one to three hours, giving residents time to escape and firefighters time to respond.

Why It Still Looks This Way

Cities that grew rapidly in the 20th century, like Phoenix or Houston, expanded during the era of cars, highways, and cheap suburban land. Their housing spread out because it could. San Francisco’s core neighborhoods were fully built out by the early 1900s, before the automobile reshaped American cities. The street grid, the lot sizes, and the building footprints were all established when people walked, took streetcars, and needed to live close to work.

Replacing this pattern would require demolishing entire blocks and re-subdividing the land, something that’s politically and financially impossible in a city where a single row house can sell for well over a million dollars. Instead, the tight spacing has become part of San Francisco’s identity. The painted ladies, the pastel row houses climbing steep hills, the rhythmic repetition of bay windows inches apart: all of it traces back to Gold Rush speculators who carved a peninsula into the narrowest lots the market would bear.