A centrifugal separator for separating a fluid mixture into a first component and a second component, wherein the second component is denser than the first component, said centrifugal separator comprising: a rotating bowl, which is rotatably supported by a frame around a rotational drive shaft, and which rotational drive shaft is rotatable around an axis of rotation; an electrical motor connected to the rotational drive shaft; an inlet to the rotating bowl; a first outlet for the separated lighter first component of the fluid mixture; and a second outlet for the separated second component of the fluid mixture; a cooling device for the electrical motor comprising: a body connected to the frame of the centrifugal separator, wherein the body comprises a central opening provided with an inner peripheral surface, which is connected to a stator of the electrical motor; and wherein the body further comprising an outer peripheral surface; characterised by, a cooling coil arranged in the body and extending circumferentially around the central opening, wherein the cooling coil comprises a tube provided with an inlet opening and an outlet opening for a cooling fluid; and wherein a first end part and a second end part of the tube are configured to extend axially in the separator, wherein the inlet opening is arranged in the first end part and the outlet opening is arranged in the second end part. a rotating bowl, which is rotatably supported by a frame around a rotational drive shaft, and which rotational drive shaft is rotatable around an axis of rotation; an electrical motor connected to the rotational drive shaft; an inlet to the rotating bowl; a first outlet for the separated lighter first component of the fluid mixture; and a second outlet for the separated second component of the fluid mixture; a cooling device for the electrical motor comprising: a body connected to the frame of the centrifugal separator, wherein the body comprises a central opening provided with an inner peripheral surface, which is connected to a stator of the electrical motor; and wherein the body further comprising an outer peripheral surface; characterised by, a cooling coil arranged in the body and extending circumferentially around the central opening, wherein the cooling coil comprises a tube provided with an inlet opening and an outlet opening for a cooling fluid; and wherein a first end part and a second end part of the tube are configured to extend axially in the separator, wherein the inlet opening is arranged in the first end part and the outlet opening is arranged in the second end part. a body connected to the frame of the centrifugal separator, wherein the body comprises a central opening provided with an inner peripheral surface, which is connected to a stator of the electrical motor; and wherein the body further comprising an outer peripheral surface; characterised by, a cooling coil arranged in the body and extending circumferentially around the central opening, wherein the cooling coil comprises a tube provided with an inlet opening and an outlet opening for a cooling fluid; and wherein a first end part and a second end part of the tube are configured to extend axially in the separator, wherein the inlet opening is arranged in the first end part and the outlet opening is arranged in the second end part.