A two-stage pilot solenoid valve comprising: a first valve element; a second valve element that is provided on a valve stem; an electromagnetic actuator that moves the valve stem up and down; a pilot valve element that is driven so as to be opened and closed according to upward/downward movement of the valve stem; and a valve body that is provided with an inlet and an outlet, the valve body comprising a substantially rectangular parallelepiped body member, a lid-like closing member, and a cylindrical holder member, wherein among four side surfaces of the body member, an inlet is provided laterally toward the front surface near the center of the rear surface, and an outlet is provided laterally toward the rear surface on the left on the front surface in a horizontal direction, and a lateral stepped hole is provided on the right surface toward the left surface so as to communicate with the inlet and the outlet, and wherein a protruding portion is provided at the slightly left portion of an upper portion of the body member, and a stepped recessed hole, of which the upper surface is opened, is provided at the protruding portion, and wherein the holder member includes a fitting portion that is fitted to the stepped recessed hole, wherein an inflow chamber into which the first valve element is slidably fitted and which is partitioned into a first back pressure chamber and a first valve chest communicating with the inlet by the first valve element, an outflow chamber that includes a first valve port opened to the first valve chest, communicating with the outlet, and opened and closed according to sliding movement of the first valve element, a pilot valve chest formed in the protruding portion of the body member in which the pilot valve element and the second valve element are disposed so as to be movable up and down and which is partitioned into a second valve chest and a second back pressure chamber by the pilot valve element, a first pilot passage that allows the first back pressure chamber and the second back pressure chamber to communicate with each other through the second valve chest, a second pilot passage that allows the outflow chamber and the second valve chest to communicate with each other and includes a second valve port opened to the second valve chest and opened and closed according to upward/downward movement of the pilot valve element, and a first pressure equalizing passage that allows the first valve chest and the first back pressure chamber to communicate with each other are provided between the inlet and the outlet of the valve body, a pilot hole of the pilot valve element and the second valve port of the second pilot passage are opened and closed according to the upward/downward movement of the valve stem, and the first valve element is moved so that the first valve port of the outflow chamber is opened and closed, and the first valve element is movable in a direction different from upward/downward moving directions of the valve stem and the pilot valve element, wherein a second pressure equalizing passage, which allows the first valve chest and the first pilot passage to directly communicate with each other, is further provided, and wherein the second pressure equalizing passage is formed of a small longitudinal hole in the body member of the valve body between a right portion of the lower surface of the stepped recessed hole and an upper surface of the lateral stepped hole. a first valve element; a second valve element that is provided on a valve stem; an electromagnetic actuator that moves the valve stem up and down; a pilot valve element that is driven so as to be opened and closed according to upward/downward movement of the valve stem; and a valve body that is provided with an inlet and an outlet, the valve body comprising a substantially rectangular parallelepiped body member, a lid-like closing member, and a cylindrical holder member, wherein among four side surfaces of the body member, an inlet is provided laterally toward the front surface near the center of the rear surface, and an outlet is provided laterally toward the rear surface on the left on the front surface in a horizontal direction, and a lateral stepped hole is provided on the right surface toward the left surface so as to communicate with the inlet and the outlet, and wherein