A magnetic field measurement system for an undulator has been developed at the Plasma and Beam Physics (PBP) Research Facility, Chiang Mai University (CMU), as a part of the mid‐infrared (MIR) and terahertz (THz) radiation free‐electron laser (FEL) project. The measurement system consists of a motorized linear translation stage, a Hall magnetic probe, a teslameter, a motor control unit, and control software. The system is designed to precisely control the position of the probe, which can move up to 1.8 m with a minimum step of 25 μm, with high repeatability and at low cost. The system is able to record transverse magnetic field intensities as a function of the probe's position in real time and has been used to measure the magnetic field of the MIR and THz undulator. Herein, the components, construction, and test results of the system are described.