A brake hydraulic pressure generating device, including: a master cylinder which is operated by operation of a brake operator; a stroke simulator which provides a pseudo operational force to the brake operator; a main hydraulic pressure passage (9a, 9b) which communicates between the master cylinder and a wheel cylinder; a branch hydraulic pressure passage (9e, 9f, 9g) which is branched from the main hydraulic pressure passage (9a, 9b) and reaches the stroke simulator; and an on/off valve which opens/closes the branch hydraulic pressure passage (9e, 9f, 9g), wherein the on/off valve includes a first valve mechanism including a first valve portion and a first valve seat which has an annular shape and receives the first valve portion, and a second valve mechanism including a second valve portion which has a cylindrical shape, the first valve seat being formed in the second valve portion and a second valve seat which has an annular shape and receives the second valve portion, wherein the on/off valve is a solenoid valve including a fixed core and a movable core in which the first valve portion is provided, wherein a pressure receiving area in which brake hydraulic pressure acting from the stroke simulator side is received is set to be higher in the second valve portion than in the first valve portion, wherein, when brake hydraulic pressure on the master cylinder side is higher than brake hydraulic pressure on the stroke simulator side, the first valve portion is separated from the first valve seat so as to allow brake fluid to flow from the main hydraulic pressure passage (9a, 9b) to the stroke simulator through the first valve mechanism, and wherein, when brake hydraulic pressure on the stroke simulator side is higher than brake hydraulic pressure on the master cylinder side, the second valve portion is separated from the second valve seat due to brake hydraulic pressure acting on the second valve portion from the stroke simulator side, so as to allow brake fluid to flow from the stroke simulator to the main hydraulic pressure passage (9a, 9b) through the second valve mechanism, characterized in that: the second valve mechanism is designed to be prevented from being opened together with the first valve mechanism when the movable core moves toward the fixed core to open the first valve mechanism. a master cylinder which is operated by operation of a brake operator; a stroke simulator which provides a pseudo operational force to the brake operator; a main hydraulic pressure passage (9a, 9b) which communicates between the master cylinder and a wheel cylinder; a branch hydraulic pressure passage (9e, 9f, 9g) which is branched from the main hydraulic pressure passage (9a, 9b) and reaches the stroke simulator; and an on/off valve which opens/closes the branch hydraulic pressure passage (9e, 9f, 9g), wherein the on/off valve includes a first valve mechanism including a first valve portion and a first valve seat which has an annular shape and receives the first valve portion, and a second valve mechanism including a second valve portion which has a cylindrical shape, the first valve seat being formed in the second valve portion and a second valve seat which has an annular shape and receives the second valve portion, a first valve mechanism including a first valve portion and a first valve seat which has an annular shape and receives the first valve portion, and a second valve mechanism including a second valve portion which has a cylindrical shape, the first valve seat being formed in the second valve portion and a second valve seat which has an annular shape and receives the second valve portion, a second valve portion which has a cylindrical shape, the first valve seat being formed in the second valve portion and a second valve seat which has an annular shape and receives the second valve portion, wherein the on/off valve is a solenoid valve including a fixed core and a movable core in which the first valve portion is provided, wherein a pressure receiving area in which brake hydraulic pressure acting from the stroke simulator side is received is set to be higher in the second valve portion than in the first valve portion, wherein, when brake hydraulic pressure on the master cylinder side is higher than brake hydraulic pressure on the stroke simulator side, the first valve portion is separated from the first valve seat so as to allow brake fluid to flow from the main hydraulic pressure passage (9a, 9b) to the stroke simulator through the first valve mechanism, and wherein, when brake hydraulic pressure on the stroke simulator side is higher than brake hydraulic pressure on the master cylinder side, the second valve portion is separated from the second valve seat due to brake hydraulic pressure acting on the second valve portion from the stroke simulator side, so as to allow brake fluid to flow from the stroke simulator to the main hydraulic pressure passage (9a, 9b) through the second valve mechanism, characterized in that: the second valve mechanism is designed to be prevented from being opened together with the first valve mechanism when the movable core moves toward the fixed core to open the first valve mechanism.