Disclosed is a grass trimmer. A trimmer head of the grass trimmer comprises a head housing (212), a spool (211), a main motor (1) and a switching mechanism (4). The spool (211) is configured to accommodate a cutting line (21) in a winding manner. The head housing (212) is configured to accommodate the spool (211) and provided with a line through-hole (212a) for the cutting line (21) to pass therethrough. The main motor (1) drives the spool (211) to cut vegetation. The switching mechanism (4) comprises a switching device (42) and a secondary motor (41) that are in association with the head housing (212). The secondary motor (41) is configured to drive the switching device (41) to drive the head housing (212) to move up and down. When receiving a trimming signal, the switching mechanism (4) drives the head housing (212) to move to a trimming position and enter a grass trimming mode. When receiving a line feeding signal, the switching mechanism (4) drives the head housing (212) to move to a line feeding position and enter a line feeding mode. When receiving a line winding signal, the switching mechanism (4) drives the head housing (212) to move to a line winding position and enter a line winding mode. The grass trimmer enables an automatic and convenient operation.La présente invention concerne un coupe-herbe. La tête du coupe-herbe comprend un boîtier de tête (212), une bobine (211), un moteur principal (1) et un mécanisme de commutation (4). La bobine (211) est conçue pour recevoir un fil de coupe (21) enroulé. Le boîtier de tête (212) est conçu pour recevoir la bobine (211) et pourvu d'un trou traversant (212a) que traverse le fil de coupe (21). Le moteur principal (1) entraîne la bobine (211) pour couper la végétation. Le mécanisme de commutation (4) comprend un dispositif de commutation (42) et un moteur secondaire (41) qui sont associés au boîtier de tête (212). Le moteur secondaire (41) est conçu pour entraîner le dispositif de commutation (41) pour amener le bo