Bex () is a municipality in the canton of Vaud, Switzerland. It is in the district of Aigle. It has an area of 96.60 km2, an altitude of 424 m, and a population of about 5709. It is a few miles south of its sister town municipality of Aigle.