There is provided a magnetic field generator in which separation and dislocation of permanent magnets from their permanent magnet groups is prevented easily and reliably for a long period of time without sacrificing productivity. A magnetic field generator 10 includes a permanent magnet group 14a which is provided on a plate yoke 12a; a pole piece 16a which is provided in a first main surface of the permanent magnet group 14a, leaving an exposed region 18b thereon; a frame-like member 34 which is provided on the plate yoke 12a to surround the permanent magnet group 14a; and a flange-shaped member 36 which is provided in the pole piece 16a to cover the exposed region 18b. Presser bolts 44 are threaded into the frame-like member 34 and press an outer circumferential surface 18a of the permanent magnet group 14a directly or via insertion members 42. Presser bolts 48 are threaded into the flange-shaped member 36, and press the exposed region 18b of the permanent magnet group 14a directly or via insertion members 46. A plate yoke 12b has the same configuration.