Withdrawing cash from an ATM actually offers the best exchange rate, better than bureau de change or other money-sellers, because the world's banks use the official rate for calculating exchange. Where you get stung is in commissions and fees. many banks charge as much as $4 per transaction and they may apply currency conversion fees of 2 to 4%. So check with your bank about those fees.... maybe there's a cheaper alternative within your bank - or with another institution.
Some ATMs in Japan (especially in banks) won't accept foreign cards, but luckily the ATMs inside 7-11 stores will, so there's no issue with getting more cash.
Thailand is very well serviced by ATMs.
Keep all transaction receipts to check against your bank records. almost 6 years ago