There is provided an electric compressor having improved insulation between terminals of switching elements constituting an inverter. In an electric compressor including an electric motor, a compression mechanism driven by the electric motor, and an inverter that drives the electric motor, the…