A versatile, compact heater designed at National Synchrotron Light Source-II for in situ X-ray nano-imaging in a full-field transmission X-ray microscope is presented. Heater design for nano-imaging is challenging, combining tight spatial constraints with stringent design requirements for the temperature range and stability. Finite-element modeling and analytical calculations were used to determine the heater design parameters. Performance tests demonstrated reliable and stable performance, including maintaining the exterior casing close to room temperature while the heater is operating at above 1100°C, a homogenous heating zone and small temperature fluctuations. Two scientific experiments are presented to demonstrate the heater capabilities: (i) in situ 3D nano-tomography including a study of metal dealloying in a liquid molten salt extreme environment, and (ii) a study of pore formation in icosahedral quasicrystals. The progression of structural changes in both studies were clearly resolved in 3D, showing that the new heater enables powerful capabilities to directly visualize and quantify 3D morphological evolution of materials under real conditions by X-ray nano-imaging at elevated temperature during synthesis, fabrication and operation processes. This heater design concept can be applied to other applications where a precise, compact heater design is required.