Codorniz is a municipality in Spain, located in the province of Segovia within the autonomous community of Castile and León. It lies in the central part of the country, in the region north of Madrid.
According to the 2004 census conducted by Spain's National Statistics Institute (INE), the municipality had a population of 453 inhabitants. This small population figure reflects the modest scale typical of many rural municipalities in the province of Segovia.
As a municipality, Codorniz holds the administrative status that in Spain denotes a basic local government unit with its own elected council, encompassing the settlement and its surrounding territory.