Mukherjee expressed "deep anguish" and strongly condemned the incident in which heavily armed terrorists launched a brazen attack on the army-run school.
In a message, the president said: "Such heinous acts are against all tenets of humanity. They are nothing but a manifestation of the extreme evil that terrorists are capable of. The world community must unite and redouble efforts to root out terrors from every country and society."
Mukherjee conveyed his condolences to the grieving families and prayed for the speedy recovery of the injured.
Modi in a tweet said: "Strongly condemn the cowardly terrorist attack at a school in Peshawar.