A membrane pump (1) has 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 an actuating member (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 member is arranged. The membrane is detachably connected to the actuating member by a magnetic coupling, which has a first magnetic coupling part (9) fixed to the membrane and a corresponding second magnetic coupling part (10) fixed to the actuating member.