List of presidents of Costa Rica
The following article lists the presidents and heads of state of Costa Rica since Central American independence from Spain. From 1824 to 1838 Costa Rica was a state within the Federal Republic of Central America; since then it has been an independent nation.
Heads of state of Costa Rica (1824–1848)
| Head of State | Portrait | Term of office | Political affiliation | Notes | |
| Juan Mora Fernández | 1824–1833 | Liberal | Two consecutive terms; re-elected in 1829. | ||
| José Rafael Gallegos | 1833–1835 | Conservative | Resigned, Manuel Fernández Chacón and Nicolás Ulloa Soto followed as acting Heads of State. | ||
| Braulio Carrillo Colina | 1835–1837 | Liberal | First term. | ||
| Juan Mora Fernández | March–April 1837 | Liberal | Provisional. | ||
| Manuel Aguilar Chacón | 1837–1838 | Liberal | Deposed in a coup d'état. | ||
| Braulio Carrillo Colina | 1838–1842 | Liberal | Second term. Deposed in a coup d'état. | ||
| Francisco Morazán | April–September 1842 | Liberal | Deposed by popular uprising; executed on 15 September 1842. | ||
| António Pinto Soares | September 1842 | Liberal | Came to power in popular uprising, and quickly resigned. | ||
| José María Alfaro Zamora | 1842–1844 | Liberal | First term. Provisional. | ||
| Francisco María Oreamuno Bonilla | November–December 1844 | Liberal | Deposed in a coup d'état. | ||
| José Rafael Gallegos | 1845–1846 | Conservative | |||
| José María Alfaro Zamora | 1846–1847 | Liberal | Second term. | ||
| José Castro Madriz | 1847–1848 | Liberal |