Aguilar de Codés is a town and municipality in the province and autonomous community of Navarra, in northern Spain. It lies in a valley whose northern end is closed by the neighbouring Sierra de Codés, the mountain range from which the "Codés" part of the town's name is derived.
The settlement is one of the municipalities that make up the Navarre region, a territory in the north of the country bordering France. Its position at the foot of the Sierra de Codés places it within the upland landscape characteristic of that part of Navarra.