San Francisco ( SAN frən-SISS-koh; Spanish for 'Saint Francis'), officially the City and County of San Francisco, is a commercial, financial, and cultural center in Northern California. With a population of 808,437 residents in 2022, San Francisco is the fourth most populous city in the U.S. state of California. The city 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 New York City boroughs. Among the 92 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 2022. Colloquial nicknames for San Francisco include Frisco, San Fran, The City, and SF (although Frisco and San Fran are generally not used by locals).Prior to European settlement, the modern city proper was inhabited by the Yelamu, who spoke a language now referred to as Ramaytush Ohlone. On June 29, 1776, settlers from New Spain established the Presidio of San Francisco at the Golden Gate, and the 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. In 1945, the United Nations Charter was signed in San Francisco, establishing the United Nations and in 1951, the Treaty of San Francisco re-established peaceful relations between Japan and the Allied Powers. 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.
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, finance, insurance, real estate, 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 $729 billion in 2022. The wider San Jose–San Francisco–Oakland Combined Statistical Area is the fifth-most populous, with 9.0 million residents, and the third-largest by economic output, with a GDP of $1.32 trillion in 2022. In the same year, San Francisco proper had a GDP of $252.2 billion, and a GDP per capita of $312,000. San Francisco was ranked fifth in the world and second in the United States on the Global Financial Centres Index as of September 2023. Despite a post-COVID-19 pandemic exodus of business from the downtown core, the economy of the city proper grew by 15.5% between 2019 and 2022 and is still home to numerous companies inside and outside of technology, including Wells Fargo, Salesforce, Uber, Airbnb, X Corp. (formerly Twitter), Levi's, Gap, Dropbox, and Lyft.
In 2022, San Francisco had more than 1.7 million international visitors - the fifth-most visited city from abroad in the United States after New York City, Miami, Orlando, and Los Angeles - and approximately 20 million domestic visitors for a total of 21.9 million visitors. The city 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, and Alcatraz, along with the Chinatown and Mission districts. 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, and the California Academy of Sciences. Two major league sports teams, the San Francisco Giants and the Golden State Warriors, play their home games within San Francisco proper. San Francisco's main international airport offers flights to over 125 destinations while a light rail and bus network, in tandem with the BART and Caltrain systems, connects nearly every part of San Francisco with the wider region.