The 78-year-old had been taken in for treatment on Wednesday after a promotional event with Paris St-Germain forward Kylian Mbappe.
"The antibiotics are working and the tests are all (well). I think I'm ready to play again," Pele said on Twitter.
In recent years, Pele was taken to hospital for kidney and prostate problems and for exhaustion last year.
Widely regarded as the greatest player of all time, he scored 1,281 goals in 1,363 appearances during his 21-year career, including 77 goals in 91 appearances for Brazil.
He is the only player to win three World Cups, helping his country to triumphs in 1958, 1962 and 1970, and was named Fifa's Player of the Century.