San Francisco ( SAN frən-SISS-koh; 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 city in California, with 808,437 residents, and the 17th most populous city in the United States as of 2022. 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 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 Frisco, San Fran, The City, and SF (although San Fran is generally not used by locals).Prior to European colonization, 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 before permanently relocating to Manhattan, 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 $669 billion in 2021. The wider San Jose–San Francisco–Oakland 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.1 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 fifth in the world and second in the United States on the Global Financial Centres Index as of March 2023. The city houses the headquarters of numerous companies inside and outside of technology, including Wells Fargo, Salesforce, Uber, Airbnb, Twitter, Levi's, Gap, Dropbox, and Lyft.
In 2022, San Francisco had over 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, 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.