Dedham is a town in and the county seat of Norfolk County, Massachusetts, United States. The population was 25,364 at the 2020 census. It is located on Boston's southwest border. On the northwest it is bordered by Needham, on the southwest by Westwood, and on the southeast by Canton. The town was first settled by European colonists in 1635.