Eating street food in Thailand carries a small risk, but that shouldn’t hold you back (and honestly, eating in a restaurant is not necessarily any better). The best tricks for safely eating street food are to eat at local mealtimes and go to busy stalls – that ensures you’ll get fresh food, which is much less likely to cause a problem.
Beyond that, make sure everything is thoroughly cooked, avoid fruits and vegetables that don’t have a peel, and skip drinks made with water or ice.