In this paper we present a hand tracking system based on magnetic positioning. A single magnetic node is mounted on each fingertip, and two magnetic nodes on the back side of the hand. A fixed array of receiving coils is used to detect the magnetic field, from which it is possible to infer position and orientation of each magnetic node. A kinematic model of the whole hand has been developed. Starting from the positioning data of each magnetic node, the kinematic model can be used to calculate position and flexion angle of each finger joint, plus the position and orientation of the hand in space. Relying on magnetic fields, the hand tracking system can work also in nonline-of-sight conditions. The gesture reconstruction is validated by comparing it with a commercial hand tracking system based on a depth camera. The system requires a small amount of electronics to be mounted on the hand. This would allow building a light and comfortable data glove that could be used for several purposes: human-machine interface, sign language recognition, diagnostics, and rehabilitation.