Goals from Stevie May and Jeremy Helan saw the Owls maintain their unbeaten away record with a superb win at Birmingham.
After seeing the hosts have the better of the first half, Wednesday took command after the break to secure the win.
May grabbed his second goal in Owls colours to give his side the lead after 67 minutes.
The Scottish forward danced into space inside the box and drilled home at the near post.
And as tension grew late on, substitute Helan was picked out by Chris Maguire to power home one minute from time to ensure Wednesday became the first side to win at St Andrews in the league this term.
The hosts came closest to opening the scoring in the first half, just after the half hour mark when a 25 yard strike from Paul Caddis rattled back off the post.
Wednesday had the better of the early chances with Maghoma forcing a save from Randolph while Adthe Nuhiu really should have opened the scoring but volleyed narrowly wide.
Birmingham then had a run of strong chances. Paul Robinson met a corner from former Doncaster Rovers winger David Cotterill but sent a diving header wide.
And another Cotterill centre has sent narrowly over by Wes Thomas.
It took a fine block from Tom Lees to keep the Blues out when Donaldson got on the end of a Thomas cross.
And former Barnsley forward Brek Shea could have opened the scoring but saw his shot fly into the side-netting.
The Owls had the ball in the back of the net through Maghoma but he was ruled out for offside after a fine through ball from Nuhiu.
Glenn Loovens - back from suspension in place of Kamil Zayatte - almost made a catastrophic error with a header back to Westwood as Thomas raced in to claim the ball but his attempted lob was claimed by the Owls keeper.
Early in the second half Maghoma saw a shot come back off the post after pouncing first when Darren Randolph parried a low drive from Liam Palmer.
Moments earlier, Chris Maguire had drilled wide from distance in front of 14,085.
Birmingham: Randolph, Eardley (Spector 18), Grounds, Robinson, Edgar, Cotterill, Davis (Gleeson 79), Caddis, Thomas, Donaldson, Shea (Gray 54).
Subs: Doyle, Reilly, Gleeson, Duffy, Shinnie.
Wednesday: Westwood, Palmer, Lees, Loovens, Mattock, Maguire, Coke (Drenthe 64), Semedo, Maghoma, May (Helan 81), Nuhiu (Madine 74)
Subs: Kirkland, Zayatte, Dielna, Buxton.
Referee: James Adcock