Shortly before last May’s European Elections, Michael Abberton heard a knock at the door of his Cambridgeshire home. Standing in his doorway were two policemen. As an assessor for an exam board and a Green Party blogger, Abberton can’t have been used to visits from the police. He asked the officers what he could help them with. They said they were there to talk about something he had posted on Twitter. It soon emerged that the post that had prompted the visit was an image of a spoof poster titled “reasons to vote UKIP” which listed some of the party’s policies, including raising income tax for the poorest 88 per cent of Britons and scrapping employee holiday entitlement. A UKIP councillor had seen the tweet and called the police to complain.

“It wasn’t until after they left that I questioned why they had visited me,” said Abberton of what for him must have been a surreal, unsettling encounter. “A complaint had been made but with no legal basis. Not a police matter. So why did they come to my home in the middle of a Saturday afternoon? Also, seeing as my [Twitter] profile doesn’t have my location — how did they know my address, or even the town I live in? And is it not a matter for concern that a political party would seek to silence dissent and debate in such a manner?”

Voices from across the political spectrum condemned the police’s visit to Abberton’s home. Simon Parr, Chief Constable of Cambridgeshire, conceded that his force had made a mistake: “In this instance police attendance was not required and I have asked for our approach to this sort of incident to be reviewed to ensure we do not get involved unless there is clear evidence that an offence may have been committed.” Mistakes happen, and every police force will have its fair share of jobsworths. Surely this clumsy intrusion is nothing to get too worried about. But consider carefully what happened here: a politician contacted a police officer because someone publicly disagreed with him — this was not a personal attack or a smear, but criticism of the policies he supports — and asked for his political opponent’s message to be taken down. That the police officer who took the original complaint did not explain to the UKIP councillor he was employed to keep Cambridgeshire safe, not to monitor and police political debate, is worrying enough. The confusion of the two police officers who got as far as Abberton’s doorstep is in keeping with the confusion Britain has got itself into when it comes to how best to regulate online speech.

Justice Secretary Chris Grayling certainly had more sinister characters than Abberton in mind when, in October, he announced plans to quadruple prison sentences for online abuse from six months to two years. “These internet trolls are cowards who are poisoning our national life,” Grayling told the Mail on Sunday. “This is a law to combat cruelty — and marks our determination to take a stand against a baying cyber-mob. We must send out a clear message: if you troll you risk being behind bars for two years.” Grayling’s proposed reform has become known as “Chloe’s law” after Chloe Madeley, the daughter of television presenters Richard Madeley and Judy Finnegan, who, when her mother said she thought the rape committed by footballer Ched Evans was “less serious” because it did not involve violence, received a tidal wave of vitriol on Twitter including several rape threats.

Describing what must have a traumatic ordeal, Chloe Madeley said: “This week I was confronted by a man who said he was going to rape me. He didn’t leap out, knife in hand, from a dark alleyway to issue the chilling threat. Instead, he cowered anonymously behind his computer screen and sent me the vile threat through Twitter. Insulting, threatening, violent — the words horrified me.”

Labour MP Stella Creasy was another high-profile victim of rape threats when she backed a campaign to put Jane Austen on the new £10 note. Few would disagree that it is the job of the criminal law to tackle serious and credible threats of violence against Madeley, Creasy and others, whether those threats are made in person or online. But the law as it stands, let alone the law after Grayling’s proposed reforms which hope to punish those who “troll” (a vaguely defined category of disturbing breadth), goes much too far, painting threats of violence and language that is merely offensive or insulting with the same brush.

The universal condemnation generated by the police’s intrusion into Michael Abberton’s life was harder to come by when Azhar Ahmed, a 20-year-old from West Yorkshire, reacted to the news of an improvised explosive device attack killing six British servicemen in Lashkar Gah, Afghanistan, by writing on Facebook that he thought “all soldiers should die and go to hell”. This much less sympathetic character was charged under Section 127 (1) of the Communications Act 2003, which provides that a person is guilty of an offence if he “sends by means of a public electronic communication network a message or any other matter that is grossly offensive or of an indecent, obscene or menacing character”. Ahmed was fined £300 and sentenced to 240 hours of community service.

Despite the relative silence after his conviction, Ahmed’s case should be of concern to those interested in the preservation of free expression in Britain. Consider three statements made about Ahmed. The first is from a police spokesperson: “He didn’t make his point very well and that is why he has landed himself in bother.” The second is the message of the 500 or so activists from the English Defence League and other far-right organisations protesting outside the court on the day of Ahmed’s trial. Their placards read: “Jail those who insult our troops.” The third is the warning issued by District Judge Jane Goodwin, who, when sentencing Ahmed, said: “With freedom of speech comes responsibility. On March 8 you failed to live up to that responsibility.” Two sources are reputable, one utterly disreputable, yet their messages are disturbingly similar. However poorly Ahmed expressed his views, it would be hard to argue that his words were, at the core, anything other than political in nature. It would also be difficult to maintain that his words caused any harm beyond the offence taken by some of the great majority of us who disagree with him. Free speech, like other civil rights, is something that we are all entitled to, however unpopular our views may be. There is no quid pro quo, no “rights but only with responsibilities”. If we take Judge Goodwin’s warning to be an accurate representation of English law, the right to freedom of expression in Britain has become dangerously conditional.

While drunk, Liam Stacey, a 21-year-old student at Swansea University, tweeted racist insults about Fabrice Muamba after the Bolton Wanderers footballer suffered a cardiac arrest during a match. For sending offensive, upsetting but ultimately harmless insults, he would spend 56 days in prison. His tweets included no threatening language. The Guardian initially claimed he had been charged with “incitement to racial hatred”. ITV said it was “harassment and disorder”. The Daily Telegraph and the Daily Mail told their readers it was “racially aggravated harassment” that had ultimately done for Stacey. The law he was in fact found to have fallen foul of was Section 4A of the Public Order Act 1986, which deals with a person who “uses threatening, abusive or insulting words or behaviour, or disorderly behaviour, or displays any writing, sign or other visible representation which is threatening, abusive or insulting”. Section 4A contains no mention of incitement or racial hatred. These imprecisions and misapprehensions reflect the dangerously broad range of online behaviour that we bundle together and call “trolling”.

There is now a steady supply of “trolls” hauled into court for something they have said online. Some of them deserve to be there. None of them are very appealing figures: the likes of Liam Stacey and Azhar Ahmed do not make for heroes of free speech. Because of their unpopularity, defences of their freedom to voice unpopular views are few and far between. In place of an intelligent conversation about the kind of online speech we should allow and the kind we should not, we have poorly articulated rants about “trolls”, the evil they do and the bravery of those who stand up to them. The politicians’ treatment of the issue is as clumsy as the media’s. Grayling’s proposals are unneccessary. “Chloe’s law” is nothing more than legislation as public relations — multiple existing laws deal with the behaviour he wants to clamp down on — and the Justice Secretary’s characterisation of a “baying cyber mob” is at odds with reality. Watch those accused of saying unpleasant things online enter a courtroom and you will see that they do not fit Grayling’s caricature: these are sad and lonely people, and rarely is the public interest in pursuing them particularly convincing.

The convictions of Stacey, Ahmed and others have contributed to a nationwide chill on freedom of speech. In polling commissioned for Speakers Cornered: Twenty-First Century Britain’s Culture of Silence, a report I have written for the New Culture Forum, YouGov found that 41 per cent believe we are not as free to speak our minds as we should be while just 12 per cent thought we are too free to do so. Those who do feel constrained were asked what they thought was stopping people from speaking freely. The largest proportion, 38 per cent, said they thought people worried about being prosecuted for saying something illegal. There is a palpable unhappiness with the policing of speech, online or otherwise, and yet the policy pronouncements of Chris Grayling, Theresa May and others will further deprive us of a vital liberty.

Although the political climate hardly makes them likely, two reforms would help restore sanity to the way online speech is regulated. The first would be decriminalisation of any speech that is merely offensive or insulting, even if it is grossly offensive. Online speech, like all speech, should only be illegal if it constitutes a credible and serious threat, or if it is part of a pattern of harassment. If such a change is not possible, then at the very least there should be a commitment from the police to limit their activity in this area to communications about which they receive complaints. Ultimately, though, the only proper way of dealing with even the most hateful speech is not the criminal law but a thick skin.