|Flag of El Salvador|
|Adopted||May 17, 1912 |
The grand flag (bandera magna) of El Salvador consists of three equal horizontal bands of blue (top), white, and blue with the national emblem centred in the white band; the emblem is encircled by the words REPUBLICA DE EL SALVADOR EN LA AMERICA CENTRAL. 
Three flags may be used as official flags of El Salvador.
- The grand flag (bandera magna), as described above — also is used as war flag and ensign.
- The national flag (bandera nacional), consisting of three equal horizontal bands of blue (top), white, and blue with the motto DIOS UNION LIBERTAD in golden lettering in the middle of the white band, ratio 3:5 — also is used as war flag and civil ensign.
- The civil flag (bandera de uso civil), consisting of three equal horizontal bands of blue (top), white, and blue not charged with anything, ratio 3:5.
The flag uses blue-white-blue colour scheme, common for the Central American nations. Ultimately it's based on the flag of Argentina, one of the earliest Spanish colonies to proclaim independence. The white stripe between two blue stripes generally are interpreted as representation of the Central American isthmus between two oceans.
Also the colours are interpreted as follows:
- The blue stripes: justice, loyalty, fraternity.
- The white stripe: purity, integrity, peace and the nation. 
From the 16th century through 1821 Central America formed the Captaincy General of Guatemala. Officially, the Captaincy was part of the Viceroyalty of New Spain and therefore under the rule of the Spanish viceroy in Mexico City.
On September 15, 1821, Mexico (including the Captaincy General) proclaimed its independence from Spain. For short time the Spanish Captain General remained leader of independent Guatemala.
On July 1, 1823, the congress of Central America declared absolute independence from Spain, Mexico, and any other foreign nation, and a Republican system of government was established. In 1823 the Federal Republic of Central America was formed, and El Salvador became one of its five states. The federation broke up in 1838 but El Salvador continued to use its insignias.
From 1865 to 1912, a different flag was in use, based on the flag of the United States, with a field of alternating blue and white stripes and a red canton containing white stars, whose number was corresponding to the number of regional departments.