Hayward (; formerly Haywards, Haywards Station, and Haywood) is a city located in Alameda County, California in the East Bay subregion of the San Francisco Bay Area. With a 2019 population of 159,203, Hayward is the sixth largest city in the Bay Area and the third largest in Alameda County. Hayward was ranked as the 32nd most populous municipality in California. It is included in the San Francisco–Oakland–Fremont Metropolitan Statistical Area by the US Census. It is located primarily between Castro Valley, San Leandro and Union City, and lies at the eastern terminus of the San Mateo–Hayward Bridge. The city was devastated early in its history by the 1868 Hayward earthquake. From the early 20th century until the beginning of the 1980s, Hayward's economy was dominated by its now defunct food canning and salt production industries.
Human habitation of the greater East Bay, including Hayward, dates from at least 4000 BC. The most recent pre-European inhabitants of the Hayward area were the Native American Ohlone people.
In the 19th century, the land that is now Hayward became part of Rancho San Lorenzo, a Spanish land grant to Guillermo Castro, in 1841. The site of his home was on the former El Camino Viejo, or Castro Street (now Mission Boulevard) between C and D Streets, but the structure was severely damaged in the 1868 Hayward earthquake, with the Hayward Fault running directly under its location. Most of the city's structures were destroyed in the earthquake, the last major earthquake on the fault.