The several branches of the United States Armed Forces are represented by flags, among other emblems and insignia. Within each branch, various flags fly on various occasions, and on various ships, bases, camps, and military academies.
All naval vessels belonging to the United States fly the Ensign of the United States, which is identical to the flag of the United States (though originally was a design similar to the Grand Union Flag). All documented U.S. vessels, and all U.S. vessels in international or foreign waters, are required to display this ensign between 08:00 and sunset. Conversely, vessels of the U.S. Coast Guard display a unique ensign as a demonstration of its authority to stop, board, search, and conduct arrests and seizures aboard vessels subject to United States jurisdiction. Historically, the ensign displayed has changed as the flag of the United States has changed. Similarly, vessels of the Continental Navy flew many varied ensigns due to a vague standard set by the Continental Congress, the arrangement of stars and pattern of stripes being left to the commander's interpretations.
A Commissioning or Masthead pennant is flown from the masthead and represents the commission of the captain of the ship (and thus of the ship itself). Additionally, a Church pennant may be flown during religious services. This pennant, white with a blue cross (or blue tablets and Star of David for Jewish services), is the only flags authorized to be flown above the national ensign, and only when at sea. In addition, hospital ships display the Red Cross.
Officers with certain offices or billets, as well as all generals and admirals, have a personal flag assigned to represent their authority and/or command; thus why they are often referred to as "flag officers". Ashore, they are usually displayed within the owner's office or raised on a secondary flagstaff near the unit colors; while they are flown aboard ship according to rank. The appearance consists of a number of stars equal to the officer's rank insignia, the colors determined by service: red with white stars for the Army and Marine Corps, blue with white stars for Naval commanders and Air Force. Certain staff and non-line officers have unique colors: white with blue stars for non-command Navy admirals, while Army chaplains and medical generals use ecclesiastical purple and maroon backgrounds, respectively.
In addition, the Navy will display the flag of the Secretary of State]] when he or she is embarked as the representative of the United States. Other diplomatic personnel are also afforded a [[:File:ConsularFlag-USNSpec.svg|consular flag when embarked. The Coast Guard, being part of the , will utilize the Secretary's flag much like the Navy will utilize the SecDef's.