A membrane pump (1) comprising, a pump housing, a membrane (4), which is mounted to the pump housing and delimits a pump chamber (8) inside the pump housing, an inlet (5) and an outlet (6) for feeding medium into and out from the pump chamber, and actuating means (7) for moving the membrane back and forth between a first and a second position. The membrane, the inlet and the outlet are arranged in a first part (2) of the pump housing, the first part being detachably connected to a second part (3) of the pump housing, in which the actuating means is arranged. The membrane is detachably connected to the actuating means by means of a magnetic coupling, which comprises a first magnetic coupling part (9) fixed to the membrane and a corresponding second magnetic coupling part (10) fixed to the actuating means. (Fig 1)