The San Francisco Municipal Railway (Muni) is the primary public transit system for San Francisco, California. Muni is part of the San Francisco Municipal Transportation Agency, which is also responsible for the streets, parking, traffic signals, and other transportation in the city. In 2019, Muni had the eighth-highest ridership among systems in the United States, with an average weekday ridership of 684,600. Service is operated to all parts of San Francisco, including Treasure Island, as well as small sections of Daly City and Marin County.

Muni operates seven light rail lines in the Muni Metro system, two streetcar lines (E Embarcadero and F Market & Wharves), and three cable car lines. Daytime bus service includes 44 local routes, 5 limited-stop "Rapid" routes, and 15 peak-hour express routes. Four additional express routes provide weekend service to the Marin Headlands, service to Oracle Park (home of the San Francisco Giants), and the Chase Center (home of the Golden State Warriors) and supplement BART in the early morning. Overnight night bus "Owl" service—part of the All Nighter network—includes eight 24-hour routes, two night-only routes, three bus replacements of Muni Metro lines, and five-weekend early-morning Muni Metro replacement lines. Fourteen local routes (two only at certain times), one rapid route, and four Owl routes run as electric trolleybuses. Muni service operates out of ten yards and garages: one cable car barn, three light rail/streetcar yards, two trolleybus garages, and four bus garages.

Routes have two-part names consisting of a number or a letter and a designation, such as "19 Polk" and "N Judah," where the second portion is usually the street on which the longest section of the route runs (or in some cases, a neighborhood, destination or landmark). Light rail and streetcar lines are lettered, while bus routes are numbered. The letter/number scheme was created by Muni, while the two-part naming scheme was created by the Market Street Railway, which Muni absorbed in 1944. The three cable car lines are largely known by name (Powell-Mason, Powell-Hyde, and California), though they are abbreviated to PM, PH, and C on maps, and have internal numbers 59–61 for operational purposes.

Muni began service on December 28, 1912, when the A Geary-Park line was inaugurated, running between the Financial District and the Richmond District on the western side of the city. The streetcar system was expanded over the next 16 years, including the Stockton Street Tunnel in 1914, Twin Peaks Tunnel in 1918 and the Sunset Tunnel in 1928. Muni began operating buses in 1917, and trolleybuses in 1941. The city acquired the competing Market Street Railway in 1944, doubling the size of Muni; its purchase of the bankrupt California Street Cable Railroad in 1952 made it the city's sole transit operator. Replacement of streetcars by buses in the 1940s and 1950s left only five streetcar lines; they were converted to Muni Metro light rail in 1980 with the completion of the Market Street subway. Numerous service changes over the lifetime of Muni gave rise to the lines in use today; a number of other lines have been discontinued.

During the COVID-19 pandemic, service was initially reduced to a limited set of "core service" routes, then gradually expanded. , six Muni Metro routes, one streetcar route, one bus replacement for a Muni Metro route, three cable car routes, 43 local bus routes, four Rapid routes, and three express routes are in operation. Several of those routes have been temporarily modified. Twelve overnight Owl routes and one early-morning express route are in operation.

Cable car lines

All three cable car lines are based out of the cable car barn at Mason and Washington.

+ Muni cable car lines Route Inbound terminal Outbound terminal Ridership California (C) California and Market California and Van Ness 4,000 Powell-Hyde (PH) Powell and Market Hyde and Beach 7,800 Powell-Mason (PM) Taylor and Bay 5,100

Muni Metro and historic streetcar lines

Muni runs six Muni Metro light rail lines (J, K, L, M, N, and T), plus a shuttle service (S). The S Shuttle operates as an additional subway service at peak hours; extended S service is also used to serve events at Oracle Park (primarily San Francisco Giants games) and Chase Center (primarily Golden State Warriors games).

Two streetcar lines (E and F) use historic streetcars but serve as full transit routes rather than mere tourist attractions. Muni Metro lines are based out of two yards, Green Division (located at Balboa Park station) and Muni Metro East; the historic streetcar lines are based at Cameron Beach Yard (also near Balboa Park).

All routes except the E Embarcadero are in operation.

+ Muni streetcar lines Route Inbound terminal Outbound terminal (Fisherman's Wharf) (Caltrain Depot) (SF Zoo) San Jose and Geneva (Balboa Park) 4th and King(Caltrain Depot) (Ocean Beach) Embarcadero

Local bus lines

Muni operates 44 local bus routes. Most routes operate on weekdays and weekends; the 41 and 88 operate only during weekday peak hours. A number of routes have different terminals during evenings and/or weekends. Route 5 uses trolleybuses only during evenings and weekends. Route 9 uses articulated buses on weekends.

+ Key to table notes Electric trolleybus routes ♦ Community routes using buses ^ Routes using articulated buses N Routes not operating during COVID-19 pandemic M Routes with modified routing during COVID-19 pandemic

+ Route Note Inbound terminal Outbound terminal Ridership 1 California Clay and Drumm Geary and 33rd Avenue 23,500 2 Clement N Steuart and Market (Ferry Plaza) Clement and 14th Avenue (Park Presidio) 5,200 2 Sutter Steuart and MarketCalifornia and Presidio 3 Jackson N Sutter and Sansome Presidio and California 2,500 5 Fulton ^ Market and 7th Street (weekday daytime) Fulton and 6th Avenue (weekday daytime) 8,400 5 Fulton ^ Salesforce Transit Center (other times) Cabrillo and La Playa (other times) 6 Hayes/Parnassus Hyde and Grove (Civic Center) Quintara and 14th Avenue 7,800 7 Haight/Noriega ^ Salesforce Transit Center Ortega and 48th Avenue 9,400 8 Bayshore ^ Kearny and North Point City College (Unity Plaza) 22,800 9 San Bruno ^Uses 40-foot buses on weekdays, 60-foot buses on weekends. 11th Street and Market (weekday daytime)Market and Steuart (Ferry Plaza) (other times) Bayshore and Arleta (weekday daytime)McLaren School (other times) 9,700 10 Townsend N Jackson and Fillmore (weekday daytime)Jackson and Van Ness (other times) 24th Street and Potrero 6,500 12 Folsom/Pacific Van Ness and Pacific Valencia and Cesar Chavez 6,300 14 Mission ^ Steuart and Mission (Ferry Plaza) Mission and San Jose (Daly City) 24,900 15 Bayview Hunters Point Express Sutter and Sansome Palou and 3rd Street N/A 18 46th Avenue Legion of Honor (daytime)33rd Avenue and Geary (evening) 19th Avenue and Buckingham Way 3,200 19 Polk Beach and Polk (Aquatic Park) Galvez and Robinson 6,900 21 Hayes N Steuart and Market (Ferry Plaza) Fulton and Shrader (weekday daytime)Fulton and 8th Avenue (other times) 6,600 22 Fillmore Fillmore and Bay Mission Bay North and Third Street 16,000 23 Monterey Palou and Third Street Great Highway and Sloat (San Francisco Zoo) 3,800 24 Divisadero Jackson and Webster Third Street and Palou 12,000 25 Treasure Island Salesforce Transit Center Avenue H and 13th Street (Treasure Island) 2,800 27 Bryant M Pacific and Van Ness 24th Street Mission station 6,200 28 19th Avenue Powell and Beach (Fisherman's Wharf) Daly City station 11,700 29 Sunset Bowley and Lincoln (The Presidio) (daytime)25th Avenue and California (evening) Fitzgerald and Keith 17,500 30 Stockton ^ Townsend and 4th Street Crissy Field in The Presidio (daytime)Divisadero and Chestnut (evening)Van Ness and North Point (some trips - as 30S) 20,400 31 Balboa M Cyril Magnin and Market Street Cabrillo and La Playa 8,800 33 Ashbury/18th Street Sacramento and Cherry (daytime)Arguello and California (evening) 25th Street and Potrero 5,700 35 Eureka M ♦ Castro station Glen Park station 1,100 36 Teresita M ♦ Forest Hill station Valencia and Mission 1,500 37 Corbett ♦ Masonic and Haight Parkridge and Burnett 2,200 38 Geary ^ Salesforce Transit Center 32nd Avenue and Balboa (daytime)Fort Miley Hospital (daytime)48th Avenue and Point Lobos (evening) 21,500 39 Coit ♦ North Point and Stockton Coit Tower 500 41 Union N Main and Howard Lyon and Greenwich 3,500 43 Masonic Marina and Laguna (Fort Mason) Munich and Geneva 12,600 44 O'Shaughnessy 6th Avenue and California Hudson and Third Street 15,500 45 Union/Stockton Townsend and 4th Street Lyon and Greenwich 10,000 47 Van Ness N Powell and Beach Townsend and 4th Street 11,900 48 Quintara/24th Street 22nd Street and Iowa Great Highway and Rivera 7,600 49 Van Ness/Mission ^ Van Ness and North Point City College (Unity Plaza) 25,000 52 Excelsior ♦ Forest Hill station Dublin and La Grande 2,000 54 Felton Newhall and Hudson Daly City station 6,800 55 Dogpatch 16th Street Mission station 20th Street and 3rd Street 1,900 56 Rutland M ♦ Visitacion Valley Middle School Thomas Mellon Circle (daytime)Arleta and Bayshore (evening) 400 57 Parkmerced West Portal station Daly City station 2,100 58 Lake Merced Stonestown Galleria Mission and San Jose N/A 66 Quintara ♦ 9th Avenue and Judah Vicente and 30th Avenue 800 67 Bernal Heights ♦ 24th Street Mission station Ellsworth and Crescent 1,400 88 BART Shuttle N Balboa Park station Sickles and Alemany (AM)Mission and Sickles (PM) 400

Rapid bus lines

On five high-ridership corridors, local buses are supplemented with rapid buses with limited stops. The Rapid routes largely follow the route of the local buses, with some variations; at times when the 5R and 9R operate, the 5 and 9 are cut back to a shorter route. The 5R, 9R, and 28R operate only on weekdays until 7pm; the 14R and 38R operate every day until 7pm.

+ Route Note Inbound terminal Outbound terminal Ridership 5R Fulton Rapid ^ Salesforce Transit Center Cabrillo and La Playa 12,900 9R San Bruno Rapid ^ Main and Mission Sunnydale and McLaren School 11,700 14R Mission Rapid ^ Mission and Main Daly City station 18,900 28R 19th Avenue Rapid M California and 6th Avenue Daly City station 4,500 38R Geary Rapid ^ Salesforce Transit Center Point Lobos and 48th Avenue 29,500

Express bus lines

Muni operates several types of express routes. Twelve routes operate between outer neighborhoods and downtown. The local sections in the outer neighborhoods overlap with local routes of the same number, while the non-stop express sections operate on expressways or major arterials. They operate only during weekday peak hours, with service only in the peak direction. Buses in the opposite direction run deadhead except for the 8AX and 8BX, which are paired with the local route 8 in the non-peak direction. Eight of the express routes are paired into 'A' and 'B' types, which have different local segments on the same corridor. All express routes except routes 1X, 8AX, 8BX, 30X, and 78X were suspended during the COVID-19 pandemic.