Marshfield is a town in Washington County, Maine, United States. The population was 528 at the 2020 census. According to the United States Census Bureau, the town has a total area of 17.54 square miles, of which 17.01 square miles is land and 0.53 square miles is water.