The invention discloses a track detector. The track detector comprises a machine frame, a gauge measuring device and a geometric parameter measuring device for an F-shaped track, wherein the machine frame consists of a horizontal beam, a vertical beam and a running device, and one end of the horizontal beam is connected with the vertical beam; the gauge measuring device comprises a first pressing device and a gauge measuring sensor, the first pressing device is connected with the other end of the horizontal beam through an elastic component, and the gauge measuring sensor is mounted at one end, connected with the elastic component, of the horizontal beam; the geometric parameter measuring device for the F-shaped track is arranged on the vertical beam and comprises second pressing devices, a data collecting sensor and one or more brackets allowing the data collecting sensor to be mounted, and during the operation, the first pressing device, the second pressing devices and the elastic component are matched to fasten the track detector on the F-shaped track. The main body of the machine frame consists of the horizontal beam and the vertical beam, so that the track detector is good in wholeness, not prone to vibrate, simple in structure and convenient to assemble, disassemble and carry.