San Francisco (; Spanish for "Saint Francis"), officially the City and County of San Francisco, is the commercial, financial, and cultural center of Northern California. The city proper is the fourth most populous in California, with 815,201 residents as of 2021, and covers a land area of 46.9 square miles (121 square kilometers), at the end of the San Francisco Peninsula, making it the second most densely populated large U.S. city after New York City and the fifth most densely populated U.S. county, behind only four of the five New York City boroughs. Among the 91 U.S. cities proper with over 250,000 residents, San Francisco was ranked first by per capita income and sixth by aggregate income as of 2021. Colloquial nicknames for San Francisco include SF, San Fran, The City, Frisco, and Baghdad by the Bay.San Francisco and the surrounding San Francisco Bay Area are a global center of economic activity and the arts and sciences, spurred by leading universities, high-tech, healthcare, FIRE, and professional services sectors. As of 2020, the metropolitan area, with 6.7 million residents, ranked 5th by GDP ($874 billion) and 2nd by GDP per capita ($131,082) across the OECD countries, ahead of global cities like Paris, London, and Singapore. San Francisco anchors the 13th most populous metropolitan statistical area in the United States with 4.6 million residents, and the fourth-largest by aggregate income and economic output, with a GDP of $669 billion in 2021. The wider San Jose–San Francisco–Oakland, CA Combined Statistical Area is the fifth most populous, with 9.5 million residents, and the third-largest by economic output, with a GDP of $1.25 trillion in 2021. In the same year, San Francisco proper had a GDP of $236.4 billion, and a GDP per capita of $289,990. San Francisco was ranked seventh in the world and third in the United States on the Global Financial Centres Index as of March 2022.As of September 2022, the Bay Area was home to four of the world's ten largest companies by market capitalization, and the city proper is headquarters to companies such as Wells Fargo, Salesforce, Uber, First Republic Bank, Airbnb, Twitter, Block, Levi's, Gap, Dropbox, Pacific Gas and Electric Company, Lyft, and Cruise, although the COVID-19 pandemic has accelerated the exodus of business from downtown San Francisco. The city is home to a number of educational and cultural institutions, such as the University of California, San Francisco, the University of San Francisco, San Francisco State University, the San Francisco Conservatory of Music, the de Young Museum, the San Francisco Museum of Modern Art, the San Francisco Symphony, the San Francisco Ballet, the San Francisco Opera, the SFJAZZ Center, the California Academy of Sciences, the San Francisco Giants, and the Golden State Warriors. A popular tourist destination, San Francisco is known for its steep rolling hills and eclectic mix of architecture across varied neighborhoods, as well as its cool summers, fog, and landmarks, including the Golden Gate Bridge, cable cars, Alcatraz, and Chinatown and Mission districts.
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, transforming an unimportant hamlet into a busy port, 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 naval 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. More recently, statewide droughts in California have strained the city's water security.