A coffee shop in Leslieville has become an unlikely celebrity hotspot after one of the world's biggest movie stars paid a surprise visit.

Tom Hanks, who is in the city for the Toronto International Film Festival, stopped by for a cup of coffee at Grinder Coffee on Gerrard Street near Jones Avenue on Friday night.

Grinder Coffee was in the midst of a 10-day social media campaign to lure Hanks to the shop.

For the campaign, the business put up a life-size cardboard cutout of Hanks, and made daily social media posts with cheeky references to his many films.

"He was so funny and generous," said shop owner Joelle Murray, who spoke to Hanks on the phone during his visit.

"He told me I was very clever, so that made my day, absolutely."

The visit came a year after Grinder Coffee successfully campaigned for Ryan Gosling to swing by for a cup of joe.

Joelle Murray and Ryan Gosling, who visited the shop while it was actually open last year. (Grinder Coffee/Twitter)

Visit was a near-miss

While the shop is now on a two-year streak of celebrity visits during TIFF, Murray said the Hanks encounter very nearly didn't happen.

She said the two-time Oscar winner showed up at the shop after hours on Friday night, and had to knock at the door to get the attention of a staff member closing up the business.

An employee of Murray's, who was alone at the store, said Hanks pointed to his cardboard likeness, then pointed to himself while standing on the sidewalk.

After one of the world's most recognizable and beloved movie stars was let inside, he called Murray.

"I picked up the phone and it wasn't my staff, it was Tom Hanks," said Murray, who was at home eating dinner with her family.

"So that was quite a surprise."

Hanks stars as the children's television icon Fred Rogers in the biopic, A Beautiful Day in the Neighborhood, which premieres on Saturday night.