Ontario is a city in southwestern San Bernardino County in the U.S. state of California, 35 mi east of downtown Los Angeles and 23 mi west of downtown San Bernardino, the county seat. Located in the western part of the Inland Empire metropolitan area, it lies just east of Los Angeles County and is part of the Greater Los Angeles Area. As of the 2020 Census, the city had a population of 175,265.