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