This study suggests a new algorithm based on a combination of fuzzy logic and genetic algorithm (GA) to improve voltage profile in a microgrid. The considered microgrid includes control variables such as onload tap changer (OLTC), active power output from distributed generators (DG) and reactive power output from feeder switched capacitors that are controlled in a microgrid controller (MGC) by communication links. The proposed method was used to obtain the optimum value of control variables to establish voltage stabilization in varying load condition as online. For establishing voltage stabilization at the microgrid, an objective function is defined and is tried to minimize it by control variables. The control variables were changed based on fuzzy logic and the GA was employed for finding the optimum shape of membership functions. In order to verify the proposed method, a 34 buses microgrid in varying load condition was analyzed and was compared with previous works.