The bill, which was put forward last year and still must pass in the lower house of parliament, was voted through the Senate just a day after Fifa President Sepp Blatter, arguably the most powerful man in world sport, announced his resignation amid a mammoth corruption scandal.
The law would make it possible for federal prosecutors to launch corruption probes against Fifa which is based in Switzerland, and around 60 other Swiss-based international sporting federations, including the Lausanne-based International Olympic Committee.
The vote had long been scheduled and was not linked to the latest wide-ranging scandal rocking football's world body.
Seven FIFA officials arrested in Switzerland last week were among 14 football officials and sports marketing executives accused by US prosecutors of complicity in giving or receiving more than $150 million in bribes.
Blatter himself is reportedly of interest in that investigation, which is also probing a $10 million FIFA payment to 2010 World Cup host South Africa.
A separate Swiss investigation is, meanwhile, looking into the awarding of the 2018 and 2022 World Cup tournaments to Russia and Qatar respectively.
"What we have witnessed recently must lead us to reform the law against corruption . . . and ensure that Switzerland is not a haven for associations intent on carrying out illicit practices," Christian Levrat, head of the Socialist party, said in the debate ahead of Wednesday's vote.
Fifa 'no yodelling club'
The bill was put forward by the government in April 2014 after years of allegations of corruption against sporting bodies, including Fifa.
Football's world body, which objected at the time to being the only international organization cited by name in the bill, was already then facing
allegations of corruption in its awarding of the 2018 and 2022 tournaments.
The law would make it possible for federal prosecutors to launch corruption probes against the some 60 international sporting federations, including Fifa and the International Olympic Committee, based in Switzerland.
Until now, corruption investigations against international sporting federations in Switzerland could only be launched if an organization filed a
complaint about alleged malpractice within its own ranks.
The bill passed with 23 votes in favour, four opposed and 16 abstaining.
But the upper house lawmakers also narrowly voted to add a provision requiring that a sporting federation's actions be deemed a "threat to public interest" before a case can be opened.
Levrat cautioned against the provision, stressing that "in the case of Fifa, armies of lawyers will come to explain that the interest of the Swiss
public is not concerned."
He also demanded a revision of the status of Fifa and similar organizations, which are treated like non-profits under Swiss law.
"You cannot handle an organization that manages billions like a yodelling club," he told the Senate.
A number of observers worry that the Fifa scandal has caused irreparable damage to Switzerland's reputation.
"It is horrendous," Geneva lawyer Charles Poncet told the Le Matin daily.
"Our country looks like a banana republic."
Last December, Switzerland already beefed up its anti-corruption arsenal in dealing with sporting federations.
Federation chiefs, who until then been exempt from Swiss laws on money laundering, were now deemed "politically exposed persons", opening them to public prosecution and forcing banks to keep tabs on where their money was coming from.