The SBB said it had been testing customer demand for Bitcoin across the wealthy Alpine federation and decided to launch a two-year pilot project beginning on November 11.
"Until now, there have only been limited opportunities to purchase Bitcoin in Switzerland," the rail service said in a statement.
It said that it would use its network of 1,000 ticket machines to let customers swap other currencies for Bitcoin, provided they give a mobile phone number for identification.
Swiss financial services company SweePay is providing the electronic conversion services.
Transactions will be capped at 500 Swiss francs ($500, 460 euros) each but SBB stressed customers will not be allowed to buy tickets with the e-money.
Bitcoin "is not accepted as a payment method," the state-owned company said.
With the current value of the currency around 689 Swiss francs, customers "will be able to purchase fractions of Bitcoin," a CFF spokesman told AFP.
Bitcoin has stirred interest as a way to move money around the world with no fees or bank involvement, but secrecy surrounding the currency, including its creator, have led to some to questions on its stability and transparency.