Heredia is a city in north-central Costa Rica, the capital of Heredia Province.
It is located at , at an elevation of 1,140 metres (approx. 3,730 ft) above sea level.
In 2004 it had a population of some 42,600 people.
The city was founded in the 1570s as Cubujuquí.
It later changed its name to Villavieja before adopting its current name in 1763.
For a brief period in the 1830s, Heredia served as the national capital.
Heredia is a sister city of Marietta, Georgia in the United States.