Ravindra produced a 101-ball 108-run knock that was laced with 13 fours and a six, while Williamson smashed 102 off 94 balls with 10 fours and two maximums after skipper Mitchell Santner decided to bat.
Daryl Mitchell (49) and Glenn Phillips (49 not out) provided the fireworks in the slog overs.
For SA, Lungi Ngidi (3/72), Kagiso Rabada (2/70) and Wiaan Mulder (1/48) were among wickets.
Brief Score
New Zealand: 362 for 6 in 50 overs (Rachin Ravindra 108, Kane Williamson 102; Lungi Ngidi 3/72).