A closure device (1) comprises a first closure part (2), which has a base element (20) and, movably arranged on the base element (20), at least one closure element (21A, 21B) with a form-fitting portion (211) arranged thereon, and a second closure part (3), which has an engagement element (31) with an engagement portion (310) formed thereon. The first closure part (2) and the second closure part (3) are separated from one another in an open position of the closure device (1) and, for closing the closure device (2), can be placed on one another along a closing direction (X1). The form-fitting portion (211) of the at least one closure element (21A, 21B) can be brought into engagement with the engagement portion (310) of the engagement element (31) in an engagement direction (X2) substantially transversely with respect to the closing direction (X1). A first magnetic element (22A, 22B) is arranged on the at least one closure element (21A, 21B) of the first closure part (2), and a second magnetic element (32) is arranged on the engagement element (31) of the second closure part (3), wherein the at least one closure element (21A, 21B) of the first closure part (2) assumes, in the open position, a first position relative to the base element (20) and is moved out of the first position when closing the closure device.