There is provided a magnetic field generator for MRI 10 applicable to a variety of magnetic field generators, and capable of preventing separation of permanent magnets 20 which constitute permanent magnet groups 14a, 14b. The magnetic field generator for MRI 10 includes a pair of permanent magnet groups 14a, 14b. The pair of permanent magnet groups 14a, 14b each including a plurality of permanent magnets 20 bonded to each other, are opposed to each other with a space in between. The permanent magnet groups 14a, 14b have projections 18 projecting more outward than the area of contact with respective pole pieces 16a, 16b. A flange-shaped member 34 is attached to each outer circumferential surface of the pole pieces 16a, 16b, covering a space-facing surface 18a of the projection 18.