The alarm was raised at 1.05am after smoke was seen coming from the barn at a farm near to Maerdy Lane, Arddleen, off the A483.
A spokesman for Mid and West Wales Fire Service said: "The barn contained straw, hay and machinery including vehicles.
"Five appliances went up there over night and two were still there at 8am damping down.
"The fire was in the hay and straw. The machinery wasn't damaged and no one was hurt.
"We don't know what the cause was yet but we will be investigating once the fire is out."
Crews from Llanfyllin, Montgomery, Llanfair Caereinion and two from Welshpool were sent to the blaze.
Firefighters pumped water from the nearby Shropshire Union Canal to damp down the hay and straw.