Piles is a municipality in the comarca of Safor, within the Valencian Community of Spain. It is located in the eastern part of the country, on the Mediterranean coast of the Iberian Peninsula.
The town belongs to the province of Valencia and forms part of the Safor administrative district, a comarca centred on the nearby city of Gandia. Like other municipalities in the region, it is governed as a local administrative unit within the Valencian Community, one of Spain's seventeen autonomous communities.
Piles is a coastal settlement, situated along the Mediterranean shoreline of the Safor area. Its position within the Valencian Community places it in a region where Valencian and Spanish are both spoken.