Slavec (Hungarian: Szalóc) is a village and municipality in the Rožňava District in the Košice Region of middle-eastern Slovakia.
In historical records the village was first mentioned in 1320.
The village lies at an altitude of 232 metres and covers an area of 17.527 km². It has a population of about 475 people.
The village has a public library.