Food author, journalist and blogger Jennifer 8 Lee in a piece she wrote for Quora traces the origin of the fortune cookie back to Japan (photo of Japanese fortune cookie).
There the cookies are known as tsujiura senbei (“fortune crackers”), omikuji senbei (“written fortune crackers”), and suzu senbei (“bell crackers”). They lack the popularity of fortune cookies in the United States and are a relative niche.
She found an image of a man making the cookie back in 1878, decades before the fortune cookie turned up in America.
That’s where the popularity of fortune cookies in Chinese restaurants exploded in World War II. Lee reports they were served mostly in California restaurants and were encountered by American GIs who would later ask for them back east. The Chinese restaurants there soon inquired about the fortune cookie and the rest is history.
So you might be wondering how fortune cookies were introduced to San Francisco’s Chinese restaurant in the first place. You can read about that along with how Japanese fortune cookies differ from the Chinese version in Quora.