The fictional town where The Andy Griffith Show is set is Mayberry.
Mayberry is presented as a small, sleepy community in North Carolina and serves as the show’s main setting from its 1960 premiere through its 1968 finale. The town includes the courthouse and jail where Sheriff Andy Taylor works, Floyd’s barbershop, Wally’s filling station, a bank, a diner, and the homes of many recurring characters. Both the town and the surrounding county are generally called Mayberry.
The setting was fictional, but it was strongly associated with Andy Griffith’s North Carolina background. Griffith grew up in Mount Airy, and the show’s gentle small-town atmosphere, local speech, and place names draw on the region. Mount Airy later embraced the connection and promoted itself as “Mayberry,” although the series did not simply depict the real town.
A common mix-up is Mount Airy, which is the real-life inspiration or cultural counterpart rather than the fictional answer. Greensboro is a real North Carolina city mentioned in the series, while Sparta is another real regional place name. Mayberry also continued as the setting of the spin-off Mayberry R.F.D., which ran from 1968 to 1971.