Under section 127 Communications Act 2003:
A person is guilty of an offence if he
(a) sends by means of a public electronic communications network a message or other matter that is grossly offensive or of an indecent, obscene or menacing character; or
(b) causes any such message or matter to be so sent.
Although this law, first enacted in 1935, was designed to protect female switchboard operators who connected telephone calls that could not be dialled direct, it now covers tweets and similar electronic messages. However, it was decided in the case of Chambers v DPP  EWHC 2157 that a message that does not create fear or apprehension in those who see it cannot be regarded as menacing.
Garron Helm, a neo-nazi from Merseyside, admitted sending an antisemitic message to Luciana Berger MP and was sent to prison for four weeks in 2014 after being convicted under this law.
However, it is possible for messages to be antisemitic but not covered by this law.
In the case of Karsten v Wood Green Crown Court  EWHC 2900, a Jewish businessman received a series of anonymous phone calls. He could hear a former employee talking in the background to the person who was making the call. The former employee said: “Ask if he is Jewish. Ask him if he’s eating kosher.” Although the former employee was convicted, he was cleared on appeal.
In his decision, Lord Justice Laws said: “The Crown Court found that the words were not grossly offensive; they were certainly offensive: a nasty, malicious antisemitic comment of which the appellant should be thoroughly ashamed, but they were not menacing. The courts need to be very careful not to criminalise speech which, however contemptible, is no more than offensive. It is not the task of the criminal law to censor offensive utterances.”
Under section 1 Malicious Communications Act 1988:
Any person who sends to another person
(a) a letter, electronic communication or article of any description which conveys
(i) a message which is indecent or grossly offensive;
(ii) a threat; or
(iii) information which is false and known or believed to be false by the sender; or
(b) any article or electronic communication which is, in whole or part, of an indecent or grossly offensive nature,
is guilty of an offence if his purpose, or one of his purposes, in sending it is that it should, so far as falling within paragraph (a) or (b) above, cause distress or anxiety to the recipient or to any other person to whom he intends that it or its contents or nature should be communicated.
Guidance from the CPS says that “no prosecution should be brought under section 1 of the Malicious Communications Act 1988 or section 127 of the Communications Act 2003 unless it can be shown on its own facts and merits to be both necessary and proportionate.”