Xhaka hobbled off the pitch fearing he had damaged ligaments in his knee.
But the 25-year-old, who suffered a bone contusion injury that will sideline him for Sunday's friendly against Spain in Villarreal, is expected to return to action quickly.
"I'm very relieved," Xhaka said via a statement issued by the Swiss football federation.
Xhaka underwent a MRI scan which ruled out a more serious injury.
Swiss team doctor Pierre-Etienne Fournier said: "We're very relieved. He has only suffered a painful bone contusion injury.
"The ligaments are intact, but we wanted to be sure that the meniscus wasn't damaged either."
Switzerland kick off their World Cup campaign against five-time champions Brazil on June 15th, before then facing Serbia and Costa Rica.