The national flag of the Republic of Costa Rica is based on a design created in 1848. It is also used as the military ensign, and includes the coat of arms of Costa Rica. The civil ensign, commonly used as an unofficial national flag, omits the coat of arms.
The flag was officially adopted on November 27, 1906, including a slight modification to the placement and design of the entrenched coat of arms. The flag was updated to reflect concurrent modifications to the national coat of arms in 1964 and 1998.
The flag of Thailand is similar to the Costa Rican flag, with the blue and red stripes being reversed.
During most of its colonial period, Costa Rica was the southernmost province of the Captaincy General of Guatemala, which was nominally part of the Viceroyalty of New Spain (i.e., Mexico), but which in practice operated as a largely autonomous entity within the Spanish Empire. As such, the land of present Costa Rica was covered by the various flags of the Spanish and Mexican Empires until 1823.
Costa Rica was part of the Federal Republic of Central America (originally known as the "United Provinces of Central America"), a sovereign state in Central America, which consisted of the territories of the former Captaincy General of Guatemala. A republican democracy, it existed from July 1823 to 1841. During this period, Costa Rica used the flag of the United Provinces of Central America, augmented by variations specific to the State of Costa Rica within the United Provinces of Central America (a blue and white striped United Provinces flag, with the Costa Rican State Seal added).
When the Federal Republic of Central America unofficially dissolved by 1841, Costa Rica made a further modification to its specific variation of the United Provinces of Central America flag.
The blue, white and red horizontal design was created in 1848 by Pacífica Fernández, wife of then president José María Castro Madriz. Fernández was inspired by France's 1848 Revolution, and the creation of the French Second Republic. The new design to the Costa Rican flag adopted the colors of the French tricolor.
The blue color stands for the sky, opportunities, idealism and perseverance. The white color stands for peace, wisdom and happiness. The red color stands for the blood spilt by martyrs in defense of the country, as well as the warmth and generosity of the people. The stripes are in the ratio 1:1:2:1:1.
The coat of arms of Costa Rica was also revised in 1848 and placed in the center of the flag. In 1906, when the coat of arms was modified, the update was placed in a white disk on the flag's red stripe, and later on an oval, set toward the hoist.
The coat of arms depicts the isthmus between the Pacific ocean and the Caribbean Sea, with 3 volcanoes. The 7 stars stand for the 7 provinces of Costa Rica. The Spanish name of the country is scrolled on a white banner, Republica de Costa Rica (Republic of Costa Rica), and the Central American union is recognized in the blue upper scroll, America Central, recalling the former United Provinces of Central America.
The flag of Costa Rica is similar to the flag of Thailand, which was adopted 11 years later. It also resembles the flag of North Korea which was adopted almost 42 years later in 1948.