A locking device and a headrest are disclosed. The locking device includes
spring elements, which can be engaged in at least one locking position
and the locking device can be displaced in relation to at least two
retaining bars that have a large number of recesses. The spring elements
co-operate with the recesses in such a way that the engagement of the
spring elements in their locking position locks the locking device in
relation to the retaining bars. According to the invention, the spring
elements are configured in such as way that the retaining bars are locked
by the mechanical fixing of the spring elements in their central zone or
by exertion of a force on the spring elements in their central zone.