Underground coal gasification (UCG) not only is a sustainable technology to develop coal resources efficiently, but also has the potential to combine with electricity generation, hydrogen fuel, and carbon capture and storage (CCS) industries. During UCG, the rock strata around the gasifier undergoes elevated high temperature conditions, resulting thermal cracking. These cracks are prone to gas leakage and groundwater influx in the gasifier. In this study, both experimental and numerical simulation are applied to investigate the crack evolution of overlying rocks. A group of samples of underground gasification roof sandstone are selected for unidirectional heating experiment. The experimental results show that the mass and density of sandstone decreases significantly at the highest heating temperatures up to 600 degrees C. Although without macroscopic cracking, sandstone samples undergo internal water loss, thermal erosion, and microscopic thermal damage. Measurement point temperatures and axial thermal stresses increases with increasing temperature. Numerical simulation of crack evolution is performed using PFC2D, and the simulation analysis shows that 200 degrees C, 350 degrees C, 500 degrees C and 600 degrees C are the characteristic points of the crack development. With the increase of temperature, the distribution area of cracks becomes wider, and the number of cracks increases gradually. The sandstone thermal damage is increased. When the temperature is 150 degrees C similar to 350 degrees C, fewer cracks are formed. Thermal damage is generated within the sandstone. The thermal damage in the sandstone is still low. As the temperature increases from 350 degrees C to 600 degrees C, cracks develop rapidly. The thermal damage within the sandstone is gradually expanded and enhanced. The sample has a tendency to stretch to both sides. Unidirectional heating of rocks helps to reveal the crack development of overlying rock during UCG processes. It provides a scientific basis for the stability control of overlying rock in UCG.