Disclosed is a respiratory valve (3) for a ventilator, comprising an inhaling pipeline port (315), a patient end port (2), a pressure sampling port (311), a valve port (319) and a dual purpose port (314), wherein the dual purpose port (314) is connected to a mechanical PEEP valve, and the valve port (319) is connected to a valve cover (33) matched with the mechanical PEEP valve, or the dual purpose port (314) is directly used as the exhalation port, and the valve port (319) connects to the valve cover (32) matched with an electronic PEEP valve. The respiratory valve (3) enables itself to be used with a mechanical PEEP valve and an electronic PEEP valve by being arranged with a dual purpose port (314). When the mechanical PEEP valve and the electronic PEEP valve are selected, only the valve covers (32) and (33) need to be changed to realize the universal usage of different ventilators, thereby increasing the application scope and work efficiency of the respiratory valve (3).