Thai Foreign Ministry's statement said the students who are in good health and spirit arrived in Bangkok on Thursday night and already returnd to their home province.
The group were arrested on June 8 at the Lahore Airport after a pistol, in parts, was found in a student's luggage.
The statement said that the Thai Embassy in Islamabad had sent a diplomat to Lahore to help the students.
The embassy will follow up the case and cooperate with the Pakistani authorities until the case closes.