Uncle Sam (initials U.S.) same as the United States is a common national personification of the United States government that, according to legend, came into use during the War of 1812 and was supposedly named for Samuel Wilson. The first use of Uncle Sam in literature was in the 1816 allegorical book "The Adventures of Uncle Sam in Search After His Lost Honor" by Frederick Augustus Fidfaddy, Esq. An Uncle Sam is mentioned as early as 1775, in the original "Yankee Doodle" lyrics of the Revolutionary War. It is not clear whether this reference is to Uncle Sam as a metaphor for the United States, or to an actual person named Sam. The lyrics as a whole clearly deride the military efforts of the young nation, besieging the British at Boston. The 13th stanza is:

Old Uncle Sam come there to change
Some pancakes and some onions,
For 'lasses cakes, to carry home
To give his wife and young ones.

The precise origin of the Uncle Sam character is unclear, but a popular legend is that the name "Uncle Sam" was derived from Samuel Wilson, a meatpacker from Troy, New York who supplied rations for American soldiers during the War of 1812. There was a requirement at the time for contractors to stamp their name and where the rations came from onto the food they were sending. Wilson's packages were labeled "E.A – US." When someone asked what that stood for, a co-worker jokingly said, "Elbert Anderson [the contractor] and Uncle Sam," referring to Wilson, though the "US" actually stood for United States. Doubts have been raised as to the authenticity of this story, as the claim did not appear in print until 1842. Additionally, the earliest known mention definitely referring to the metaphorical Uncle Sam is from 1810, predating Wilson's contract with the government. As early as 1835, Brother Jonathan made a reference to Uncle Sam, implying that they symbolized different things: Brother Jonathan was the country itself, while Uncle Sam was the government and its power.

By the 1850s, the names Brother Jonathan and Uncle Sam were being used nearly interchangeably, to the point that images of what had previously been called "Brother Jonathan" were being called "Uncle Sam". Similarly, the appearance of both personifications varied wildly. For example, one depiction of Uncle Sam in 1860 showed him looking like Benjamin Franklin, while a contemporaneous depiction of Brother Jonathan looks more like the modern version of Uncle Sam, though without a goatee.

Uncle Sam did not get a standard appearance, even with the effective abandonment of Brother Jonathan near the end of the American Civil War, until the well-known "recruitment" image of Uncle Sam was first created by James Montgomery Flagg during World War I. The image was inspired by a British recruitment poster showing Lord Kitchener in a similar pose. It is this image more than any other that has influenced the modern appearance of Uncle Sam: an elderly white man with white hair and a goatee, wearing a white top hat with white stars on a blue band, a blue tail coat, and red-and-white-striped trousers.

Flagg's depiction of Uncle Sam was shown publicly for the first time, according to some, on the cover of the magazine Leslie's Weekly on July 6, 1916, with the caption "What Are You Doing for Preparedness?" More than four million copies of this image were printed between 1917 and 1918. Flagg's image was also used extensively during World War II, during which the U.S. was codenamed "Samland" by the German intelligence agency Abwehr. The term was central in the song "The Yankee Doodle Boy", which was featured in 1942 in the musical Yankee Doodle Dandy.

There are two memorials to Uncle Sam, both of which commemorate the life of Samuel Wilson: the Uncle Sam Memorial Statue in Arlington, Massachusetts, his birthplace; and a memorial near his long-term residence in Riverfront Park, Troy, New York. Wilson's boyhood home can still be visited in Mason, New Hampshire. Samuel Wilson died on July 31, 1854, aged 87, and is buried in Oakwood Cemetery, Troy, New York.

In 1989, "Uncle Sam Day" became official. A Congressional joint resolution designated September 13, 1989 as "Uncle Sam Day", the birthday of Samuel Wilson. In 2015, the family history company MyHeritage researched Uncle Sam's family tree and claims to have tracked down his living relatives.