The greater Bangkok area is home to more than 17 million people, many of whom live in high-rise apartments.
Many buildings were evacuated as they swayed in the rare quake.
The epicenter of the earthquake was in central Myanmar, about 50 kilometers (30 miles) east of the city of Monywa. There were no immediate reports of the effect of the earthquake in Myanmar, which is in the middle of a civil war.