Ontario is a city in southwestern San Bernardino County in the U.S. state of California, 35 miles east of downtown Los Angeles and 23 miles 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.