Power systems are usually expected to become heavily loaded as the demand for electrical energy grows and economic consideration limits the installation of additional transmission and generating capacity. Keeping the bus voltage in the power system within the standard permissible limits is an important concern to improve the voltage stability and avoid voltage collapse of the whole power system. The common and effective way to achieve this purpose is by adding flexible AC transmission line devices to the power system. One of these devices is static synchronous compensator. In this paper an approach is proposed to find optimal location and size of static synchronous compensator for improving bus voltage in the power system. A load flow is conducted to identify the low voltage buses which are the weak buses in the system and they are considered as suitable buses for static synchronous compensator connection. An objective function is formulated for optimization process which contains four parts, the voltage deviation, static synchronous compensator size, active and reactive power losses of the whole power system. Whale optimization algorithm is used for the optimization process. The proposed approach is applied on the real power system of Kurdistan Region using power system simulator for engineering software for simulating the power system and finding the optimal size and location of static synchronous compensator for bus voltage improvement. The results are encouraging for applying the approach to any power system. What distinguishes this method is that it accomplishes two things, namely reducing the bus voltage deviation to zero which means that all bus voltages are within the permissible limits and minimizing losses as well.