Newburyport is a small city in Essex County, Massachusetts, United States, 35 miles (56 km) northeast of Boston. The population was 18,289 at the 2020 census.[1]