Villamar is a town and comune located in the Province of Medio Campidano within the autonomous island region of Sardinia, Italy. It is situated approximately 45 kilometres (28 mi) northwest of the city of Cagliari and about 7 kilometres (4 mi) northeast of Sanluri.
The municipality has a population of 2,392 inhabitants. It serves as a local administrative center within its province in southern Sardinia.