The three-phase four-leg (3p4L) inverter can be utilized to interface electric vehicles (EVs) with the distribution networks. Vehicle to grid (V2G) inverters are employed to charge EVs from the utility grid as well as compensating harmonics and unbalanced voltages & currents on demand. Motivated by this scenario, this paper proposes a coordinated virtual impedance control scheme for a vehicle to grid three phase four leg (V2G 3p4L) inverter. The proposed control scheme achieves simultaneously multifunctional objectives consisting of effective and good harmonic rejection capability, power sharing among V2G 3p4L inverter units with a smaller error, reactive power/voltage support during load power changes and balanced/unbalanced voltage sag conditions. An independently neutral current control approach is proposed for the fourth leg of the V2G 3p4L inverter to regulate the DC-link along with neutral current control capability. Besides, the proposed control scheme achieves grid connected mode (GCM) or standalone mode (SAM) operation capability as well as fulfilling smooth transition between operation modes without reconstructing control structure. Compared to well-known control schemes in the literature, synchronization during operation modes is also achieved without transients in voltage and current. Comprehensive tests under various scenarios validate the excellence of the proposed control scheme over existing methods.(c) 2022 Elsevier Ltd. All rights reserved.