Barx is a municipality located in the comarca of Safor, within the Valencian Community of eastern Spain. It lies in the province of Valencia, in the country's eastern coastal region.
The town is one of a number of small municipalities that make up the Safor comarca, a district centred on the coastal city of Gandia. Like much of the surrounding area, Barx sits inland from the Mediterranean coast, in a landscape of hills and valleys typical of the Valencia region's interior.
As a municipality, Barx forms part of Spain's local administrative structure, with its own local government. The Valencian Community is one of Spain's seventeen autonomous communities, and Valencian is recognised alongside Spanish in the region.