The candy cane was originally a straight, hard, and all-white candy stick invented by French priests in the early 1400s. The cane shape is traditionally credited to a choirmaster at Cologne Cathedral in Germany, who, legend has it, in 1670 bent straight sugar sticks into canes to represent a shepherd's staff, and gave them to children at church services. Another theory is that, as people decorated their Yule trees with food, the bent candy cane was invented as a functional solution. Candy with red stripes first appeared in the early 1900s. Postcards before 1900s show only white colored candy canes.
In recent years, apocryphal origin stories for the candy cane have become popular. Usually they suggest the candy cane was invented by an American Protestant, usually described as being an unnamed candy maker in 1870s Indiana, to represent Jesus. These stories typically suggest that the white of the candy cane represents Jesus's purity, the bold red stripes represents crucifixion, and the three thin red stripes stand for the Holy Trinity. This legend further posits that the general shape is for the "J" in Jesus, as well as perhaps to resemble a shepherd's cane.