Williams again looked in fine form on her way to a 6-3 6-0 victory over Stojanovic in warm conditions on Rod Laver Arena.
The American star is bidding to equal Margaret Court's record of 24 grand slam singles titles and is on track after her win in one hour, nine minutes.
As her serve gradually improved, Williams – who is dealing with a right shoulder injury – was in control for the most part to set up a third-round clash against Anastasia Potapova.
Stojanovic held her own early, but Williams broke for 3-1, a powerful forehand setting up break point before a backhand error from the Serbian.
Williams was struggling with her first serve – she had a first-serve percentage of just 52 in the first set – but dug herself out of a 15-40 hole to hold for 5-2 on her way to taking the opening set.
A break to begin the second set followed as Stojanovic powered a forehand down the line wide, and three consecutive backhand errors saw her cough up another break to fall 3-0 behind.
Williams took complete control from then on, finishing the second set without an unforced error and losing just nine points to quickly wrap up victory.
Petra Kvitova made a surprise second-round exit at the Australian Open on Wednesday.
The Czech ninth seed and two-time Wimbledon champion fell to Sorana Cirstea 6-4 1-6 6-1 on a warm day at Melbourne Park.
Runner-up in 2019 and a quarter-finalist last year, Kvitova bowed out after a costly 44 unforced errors in two hours, three minutes.