An opening and closing device is provided with: a mask (13) having an inner surface (13f) at which an exhaled breath hole (13a) is open and an opening and closing mechanism (15) which opens and closes the exhaled breath hole (13a). The exhaled breath valve (15) can move between a first position and a second position along the inner surface (13f), and the flow hole (13a) has different opening areas at the first and second positions. If the direction perpendicular to the direction of movement of the exhaled breath valve (15) is defined as a width direction (W), the length (LW) of opening of the flow hole (13a) in the width direction (W) increases or decreases from the first position toward the second position.