Scafati is situated on the river Sarno. Under the bridge over the river into the village, the Sarno divides into a primary and two secondary branches. The town is bordered by Angri, Boscoreale, Poggiomarino, Pompei, San Marzano sul Sarno, San Valentino Torio, Sant’Antonio Abate and Santa Maria la Carità.
In the early Middle Ages, the Scafati area was on the border between the Duchy of Benevento (later principality of Salerno) and the Duchy of Naples. The current settlement was created in the 18th century after the area around the Sarno river plain was stripped of the woods and a Royal road was opened in it.
During the Kingdom of the Two Sicilies, Scafati was the seat of textile workshops and of an artillery magazine, established by king Ferdinand II. Scafati was damaged by falls of pyroclastic rocks in the course of the 1707 Mount Vesuvius eruption.
During World War II, it was liberated from the German occupation by British troops on 28 September 1943.