The invention relates to a device and method for forming a knot to elongated material (30). The device comprises a body (2, 4), a central cavity (13, 15) inside the body (2, 4), a material track (3, 5) along which the elongated material (30) is guided in the device, the material track (3, 5) comprising ...