"I was just perfect today. I served just unbelievably," said Tsonga.
"But in the match before I felt really confident on this shot. I hope it will continue.
"I'm the kind of player who likes these big moments. So I hope I will have some more.
"Can I win Wimbledon? Why not?"
Federer, who had eased to his 29th consecutive Grand Slam quarter-final with 6-7 6-3 6-3 6-3 win over Mikhail Youzhny in the previous round, was philosophical after being denied a 29th Grand Slam semi-final appearance.
"Except the score, many things went right," he said.
"I was pretty pleased with my performance today and at least it took a special performance to beat me. He played an amazing match and didn't give me much hope."
The prospects of the match going the full distance had seemed remote when Federer whisked through the opening set in 27 minutes and after a tight second swept into a 5-0 lead in the tie break.
But after taking Tsonga's opening service game of the match, Federer failed to force another break point as his opponent ground him down to secure a famous victory.
Tsonga had made more frequent and successful forays to the net in the second set, but seemed to lack the consistency to overhaul the 16-time Grand Slam champion.
'Crazy' win leaves Tsonga smiling
But the 26-year-old, who had lost four of his five previous matches against Federer, combined a flurry of winners with some steely resolve to turn the tide.
A jumping forehand winner survived a challenge to move Tsonga a break ahead in the third game of the third set before he defiantly held off Federer from 0-30 down in both his penultimate and final service games of the set.
Tsonga's ambitions of reaching the last four at Wimbledon for the first time came into sharp focus as he broke again early in the fourth.
A pair of winners, one each on the backhand and forehand side, brought up three break points on Federer's serve and Tsonga seized the final one with another clean winner.
Upbeat Federer promises to return after defeat
Landing with 78% of his first attempts and winning 80% of his second-serve points, Tsonga proved unassailable for the rest of the set and his 14th ace squared the contest.
Tsonga continued to confound expectations that his momentum would peter out.
After missing a straightforward volley at 0-30 in the first game of the decider, he forced Federer to stray into the net at the end of an exchange of forehands and cede the game.
Even under the pressure of the final point, 2008 Australian Open finalist Tsonga's serve was unrelenting and as Federer's return flew long the crowd rose to salute the Frenchman, who dropped to the turf in joy.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.