Spindle thermal deformation is the main error source of many precision profile grinders. In this paper, the relationship between spindle temperature and either radial or axial thermal deformation is studied based on experiments. The placement and amount of temperature sensors are optimized. Then a kind of thermal error modeling method based on support vector machine is presented and applied in the modeling of thermal error of profile grinding. The result shows the model is robust and the on-line accurate prediction of grinding thermal error is realized based on monitoring of temperature rise of spindle. Finally, the error compensation strategy is discussed for further application of thermal error modeling.