The quake struck 32 km southwest of a town in the northern Thai city of Chiang Rai on the Myanmar border.
Severe shaking was also felt in Myanmar's largest city, Yangon.
There were no immediate reports of casualties, but minor damages to buildings and roads in Chiang Rai were reported.
In Bangkok, residents in high rise condominiums felt the powerful quake.
Several residents quickly went downstairs with their children while others were confused and stayed back.
A 73-year-old Indian tourist B Rukmini here said she gripped the door for support as she thought she was having a dizzy spell.
