This paper presents power system voltage stability enhancement using line voltage stability indices based on an optimal power flow (OPF) problem in heavily loaded and line outage contingency situations. Voltage stability indices (VSIs) are widespread indicators determining the proximity of a system to voltage collapse, and operators can protect the voltage collapse before it happens. The values of VSIs are generally between 0 (no load condition) and 1 (voltage collapse). By limiting the threshold value of VSIs, operators can move a system to a secure point when the system tends to collapse. Moreover, the values of VSIs can also be minimized in order to improve voltage stability of a system. Therefore, in the OPF problem, the VSIs are proposed as part of the constraint to restrict the threshold of the VSIs and as the objective function to improve the voltage stability. Three line VSIs consisting of Lmn, VCPI and FVSI are compared in terms of transmission line loss reduction and voltage stability improvement in the heavily loaded and line outage contingency situations. Salp swarm algorithm (SSA) is employed to solve the OPF problem. The performance of the VSIs are investigated in the IEEE 30-bus and 118-bus systems. The simulation results show the enhancement of the voltage stability and reduction of loss, especially when using VSIs as the objective function.