San Francisco (; Spanish for "Saint Francis"), officially the City and County of San Francisco, is a cultural, commercial, and financial center in the U.S. state of California. Located in Northern California, San Francisco is the 17th most populous city in the United States, and the fourth most populous in California, with 873,965 residents as of 2020. It covers an area of about 46.9 square miles (121 square kilometers), mostly at the north end of the San Francisco Peninsula in the San Francisco Bay Area, making it the second most densely populated large U.S. city, and the fifth most densely populated U.S. county, behind only four of the five New York City boroughs. San Francisco is the 12th-largest metropolitan statistical area in the United States with 4.7 million residents, and the fourth-largest by economic output, with a GDP of $592 billion in 2019. With San Jose, California, it forms the San Jose–San Francisco–Oakland, CA Combined Statistical Area, the fifth most populous combined statistical area in the United States, with 9.6 million residents as of 2019. Colloquial nicknames for San Francisco include SF, San Fran, The City, and Frisco.In 2019, San Francisco was the county with the seventh-highest income in the United States, with a per capita income of $139,405. In the same year, San Francisco proper had a GDP of $203.5 billion, and a GDP per capita of $230,829. The San Jose–San Francisco–Oakland, CA Combined Statistical Area, with a GDP of $1.09 trillion as of 2019, is the country's third-largest economy. Of the 105 primary statistical areas in the U.S. with over 500,000 residents, this CSA had the highest GDP per capita in 2019, at $112,348. San Francisco was ranked 12th in the world and second in the United States on the Global Financial Centres Index as of March 2021.San Francisco was founded on June 29, 1776, when colonists from Spain established the Presidio of San Francisco at the Golden Gate and Mission San Francisco de Asís a few miles away, both named for Francis of Assisi. The California Gold Rush of 1849 brought rapid growth, making it the largest city on the West Coast at the time; between 1870 and 1900, approximately one quarter of California's population resided in the city proper. In 1856, San Francisco became a consolidated city-county. After three-quarters of the city was destroyed by the 1906 earthquake and fire, it was quickly rebuilt, hosting the Panama-Pacific International Exposition nine years later. In World War II, it was a major port of embarkation for service members shipping out to the Pacific Theater. It then became the birthplace of the United Nations in 1945. After the war, the confluence of returning servicemen, significant immigration, liberalizing attitudes, the rise of the "beatnik" and "hippie" countercultures, the Sexual Revolution, the Peace Movement growing from opposition to United States involvement in the Vietnam War, and other factors led to the Summer of Love and the gay rights movement, cementing San Francisco as a center of liberal activism in the United States. Politically, the city votes strongly along liberal Democratic Party lines.
A popular tourist destination, San Francisco is known for its cool summers, fog, steep rolling hills, eclectic mix of architecture, and landmarks, including the Golden Gate Bridge, cable cars, the former Alcatraz Federal Penitentiary, Fisherman's Wharf, and its Chinatown district. San Francisco is also the headquarters of companies such as Wells Fargo, Twitter, Square, Airbnb, Levi Strauss & Co., Gap Inc., Salesforce, Dropbox, Pacific Gas and Electric Company, Uber, and Lyft. The city, and the surrounding Bay Area, is a global center of the sciences and arts and is home to a number of educational and cultural institutions, such as the University of California, San Francisco (UCSF), the University of San Francisco (USF), San Francisco State University (SFSU), the de Young Museum, the San Francisco Museum of Modern Art, the SFJAZZ Center, the San Francisco Symphony and the California Academy of Sciences. More recently, statewide droughts in California have strained the city's water security.