The Met Office has warned that up to 100mm of rainfall is possible in parts of west Wales, with flooding possible.
A yellow warning has been issued for south and west Wales, as far north as Aberystwyth from 9pm on Wednesday, until 11.45pm on Thursday.
The Met Office says: "Not all areas will be affected, but scattered heavy showers on Wednesday night are expected to merge into longer spells of heavy, perhaps thundery rain overnight and through Thursday.
"Where heavy downpours occur, 20-40 mm are possible within an hour or two.
"Over a longer period a few places could see more than 50-60 mm, possibly even as much as 80 to 100 mm if repeated batches of heavy rain affect the same locations - this perhaps more likely during the second half of Thursday."
Forecasters say the rain will lead to difficult driving conditions and some road closures, along with a small chance of flooding to homes and businesses.