A kind of mechanical heater with water-off and power-off protection is provided with a pipe body and a cover combined with one end of the pipe body. The pipe body is provided with a water-off protection sensor, a relay or a triac (TRIAC). One, a circuit board with a bimetal, a heating element; when the water-removal protection sensor senses that it is in the water, any one of the relay or the triac is turned on to conduct electricity, and the two The metal piece senses the temperature of the water, and controls the heating element to be heated or not by using temperature deformation. When the water-removal protection sensor senses leaving water, any of the relay or the triac is disconnected from the power supply. So that the heating element cannot be heated. The off-water protection sensor ensures that the power is quickly cut off when leaving the water to prevent the excessive heat of the aquarium heater or the glass tube from rupturing at high temperatures.一種離水斷電保護機械式加溫器,設有一管體及一結合於該管體一端之蓋體,該管體內設有一離水保護傳感器、一繼電器或雙向可控矽開關元件(TRIAC)其中任一者、一具有雙金屬片之電路板、一發熱元件;該離水保護傳感器感應到在水中時,該繼電器或該雙向可控矽開關元件(TRIAC)其中任一者接通導電,由該雙金屬片感應水溫,利用受溫變形來控制該發熱元件加熱與否;當該離水保護傳感器感應到離開水時,該繼電器或該雙向可控矽開關元件(TRIAC)其中任一者斷開電源,使該發熱元件無法加熱。藉由離水保護傳感器確保離開水時快速斷電,防止習用水族加溫器餘熱過高或者玻璃管高溫破裂之情形。