Sexist, racist and homophobic remarks were being used by pupils against school staff, as well as offensive comments about appearance, the NASUWT said.
There were also examples of parents being abusive on social media, it added.
About 60% of 1,500 teachers questioned in a poll said they had faced abuse, compared with 21% last year.
In one case, a photograph of a teacher was posted online with an insulting word underneath.
In another, pupils used the name of a heavily pregnant school worker to post insults, the teachers’ union said.
Of those who had been subjected to insults, nearly half (48%) said these remarks were posted by pupils, 40% said they were put up by parents, and 12% said both parents and pupils were responsible.
Almost two-thirds (62%) said pupils had posted insulting comments, while just over a third (34%) said students had taken photos or videos without consent.
A third (33%) received remarks about their performance as a teacher, 9% had faced allegations from pupils about inappropriate behaviour and 8% had been subjected to threatening behaviour.
More than half (57%) of pupils responsible were aged between 14 and 16, and 38% were 11 to 14, the teachers’ poll found, with a fifth aged 16 to 19 and 5% were seven to 11.
Among the examples published by NASUWT was the case of a student uploading a teacher’s photo and then, along with classmates, writing insults underneath.
One teacher had been harassed for nine months by students who sent sexually explicit messages and set up a fake social media account in the teacher’s name.
The union said it had been told of a teacher receiving the comment “I hope she gets cancer”, while the heavily pregnant worker had faced abusive remarks.
Another school worker faced comments from a pupil’s family member about how they looked and that they were ugly.
Chris Keates, the union’s general secretary, said: “It is deeply worrying to see that the abuse of teachers has risen by such a huge margin this year.
“Equally concerning is that it appears that more parents are the perpetrators of the abuse.
“The vile, insulting and personal comments are taking their toll on teachers’ health and well-being, and undermining their confidence to do their job.”