Selective Harmonic Elimination (SHE) shows superior harmonic performance at low switching frequencies to eliminate low-order harmonics and this property decreasing losses is a very effective way to reach higher efficiencies in power electronics applications. In this paper, Whale Optimizer Algorithm (WOA) is implemented to decide optimum switching angles for three-phase Voltage Source Inverter (VSI) of eliminating some high order harmonics while providing the required voltage. Besides, Particle Swarm Optimization (PSO) algorithm is also applied and the optimum switching angles are calculated off-line to eliminate the 5th, 7th, 11th, 13th, 17th, and 19th harmonics. The output voltages obtained by the application of WOA and PSO are compared using the total harmonic distortion (THD). By the comparison of these results, we show that WOA gives faster and more accurate results in terms of decreasing THD than PSO algorithm in SHE applications.