Francis, 88, had been out of public view since March 23, when he had given a short greeting before leaving Rome's Gemelli hospital after more than five weeks of treatment in the most serious health crisis of his 12-year papacy.
The Pope, in a previously unannounced move, came out to the square shortly before midday (1000 GMT) on Sunday at the end of the celebration of a Mass for the Catholic Church's Jubilee year.
Coming in front of the main altar for the service in bright sunshine, Francis waved to the crowd before speaking briefly.
"Happy Sunday to everyone," the Pope said, speaking in a frail voice while receiving oxygen via a small hose under his nose.
"Thank you so much."
The Pope smiled broadly as he greeted crowds.
His voice, though weak, sounded stronger than it had during the March 23 appearance, when he struggled to speak.
Francis usually offers a weekly noon-time prayer in St Peter's Square on Sundays but has not been able to do this since February 9.
He was admitted to hospital on February 14 for a bout of bronchitis that developed into double pneumonia - an especially serious condition for him as he had pleurisy as a young adult and had part of one lung removed.
Francis came so close to death at one point during his 38-day stay in hospital that his doctors considered ending treatment so he could die in peace, the head of his medical team said in March.
Sunday's Mass was part of a special celebration in honour of health-care workers and those who are sick.
In a written message released by the Vatican, Francis said he had felt God's closeness during his hospital stay.
"I ask the Lord that this touch of his love might reach all those who suffer and encourage those who are taking care of them," the text said.
It is unclear how often the Pope will appear in public in the coming weeks.
Doctors have prescribed Francis two months of rest at his Vatican residence to allow his ageing body to heal, and the Vatican has removed all previous commitments from his calendar.
Britain's King Charles will head to Italy in April for a state visit but has cancelled a planned meeting with Francis.
The Vatican has not said yet whether the Pope will be able to lead the celebrations on April 20 for Easter, the most important holiday of the Christian year.