The invention provides an electric pressure cooker. The electric pressure cooker comprises a cooker body, a cooker lid, an exhaust pipe, a relief valve and a switching device; the cooker body is usedfor containing cooked food, the cooker lid is arranged on the cooker body, the exhaust pipe is arranged on the cooker lid and communicated with the cooker body, the relief valve is arranged on the exhaust pipe, and a first magnetic part is arranged on the relief valve; the switching device is arranged in the cooker lid and movably arranged relative to the relief valve, multiple second magnetic parts different in magnetism are arranged on the switching mechanism, the second magnetic parts and the first magnetic part cooperate with each other and apply magnetic force to the relief valve, the switching device has multiple switching positions, and when the switching device moves between the different switching positions, the magnetic force applied to the relief valve is changed. According to the technical scheme, the problem that in the prior art, a magnetic drive structure of the relief valve of the electric pressure cooker needs high manufacturing precision and installation precision issolved.