An antifogging device includes: an optical system having one or a plurality of optical members including at least an objective lens; a hollow casing in which the optical system is stored; a heater configured to generate heat according to supplied power to heat a hollow space in the casing; a temperature sensor configured to detect temperature of the hollow space; a temperature controller configured to estimate temperature difference between the temperature detected by the temperature sensor and temperature of the optical member, based on a power value of the supplied power; and an overall controller configured to control the heater based on the temperature difference estimated by the temperature controller.