They rolled Sri Lanka for just 133 in 37.2 overs, with JP Duminy (3-29) claiming the ninth hat-trick in World Cup history, and fellow tweaker Imran Tahir (4-26) doing much of the damage, as their opponents lost 8-64.
South Africa coasted to their modest target in just 18 overs, with Quinton de Kock (78 not out off 57 balls) making a welcome return to form.
They advance to the semi-finals, where they will meet the winner of the New Zealand-West Indies quarter-final.