The boys will undergo a medical examination before being reunited with their parents.
Dozens of the 350 kidnapped boys freed from their captors in northwest Nigeria were seen arriving at local government buildings in the city of Katsina on Friday.
Their rescue was announced by the governor of northwest Katsina state late on Thursday.
Last Friday night, gunmen raided the Government Science Secondary School in Kankara town, Katsina state, on motorbikes and marched the boys into the sprawling Rugu forest, one of the country's largest woodland areas.
It was one of the biggest mass abductions in recent years.
Katsina Governor Aminu Bello Masari said late on Thursday that 344 boys had been freed from the forest in neighbouring Zamfara state. There was still some uncertainty as to whether all of those abducted had been rescued.
Photographs released by Katsina state government showed smiling boys looking out from the back of trucks.
"I couldn't believe what I heard until neighbours came to inform me that it's true," Hafsat Funtua, mother of 16-year-old Hamza Naziru, said in a phone interview.
Describing the moment she heard the news, she said she ran out of her house with joy "not knowing where to go" before returning home to pray.
Another parent, Husseini Ahmed, whose 14-year-old Mohammed Husseini was also among those abducted, expressed happiness and relief that he would soon be reunited with his son.
"We are happy and anxiously expecting their return," he said.
A Katsina state government spokesman on Friday said the boys would undergo a medical examination before being reunited with their parents. He also said they would meet President Muhammadu Buhari on Friday.
Hours before the rescue of the boys was announced, a video started circulating online purportedly showing militants from Boko Haram with some of the boys.
Reuters was unable to immediately verify the authenticity of the footage, the boys, or who released it.
In an interview with state TV channel NTA, in which he announced the release of the captives, Masari said "most" of the boys had been rescued.
But an aide told Reuters early on Friday said they were all free. "No student is still with the abductors," Katsina state government spokesman Abdu Labaran said via telephone.
The president posted a tweet on Friday of a video in which he said he had spoken to the governor and the military to congratulate them.
"The military is well trained. I am very impressed with the governor," said Buhari.
Authorities released few details about the rescue operation.
Katsina state's governor said security forces had cordoned off the area around the boys, and that not a single shot was fired.
Labaran, his spokesman, said questions about the captors and whether they had been arrested should be directed to the military.
Armed forces spokesman John Enenche and army spokesman Sagir Musa did not immediately respond to text messages and phone calls seeking comment on the military operation.