The current flag of El Salvador was adopted by the National Assembly on August 21, 1823. The colors were chosen by Manuel José Arce when he was the leader of the Salvadoran militia that fought against the annexation of Central America to Mexico in 1822. Arce created the flag of the province of El Salvador from white and blue silk, inspired by the colors of the Argentine heroes San Martin and Belgrano. The flag was consecrated on February 20, 1822 and became the national symbol of El Salvador. However, the legislature did not adopt it as a national symbol until May 17, 1912. The President of the Republic, Manuel Enrique Araujo, raised the flag for the first time in a ceremonial ceremony at the presidential rostrum on September 15 of that year, officially making it the new national symbol.

The national flag of El Salvador in 1877 consisted of 5 blue and 4 white stripes. In the upper left corner was a red square with 14 white stars symbolizing the country's departments. The previous flag had only 9 stars (1865) because there were only 9 departments at that time, but over time the number of stars increased - in 1865 to 11, in 69 to 12, in 73 to 13, and finally, from 1877 to 1912, the number of stars increased to 14.

On May 17, 1912, the flag acquired a modern look, but for a short time from 1921 to 1922, the flag design was slightly changed - the blue color was replaced by blue, and the inscription "REPUBLICA FEDERAL DE CENTRO AMERICA" ("FEDERAL REPUBLIC OF CENTRAL AMERICA") appeared on the central coat of arms. In 1922, they returned to the previous design, and since then the flag has been used in this form.