A novel shape-stabilized phase change material, prepared by immobilizing stearic acid onto tannic-acid-templated mesoporous silica nanoparticles.