Social media companies are getting faster at responding to hate speech online.

Tech companies including Facebook, Google and Twitter removed 72 percent of illegal hate speech on their platforms during 2018, the EU found. The response rate is a big increase from two years ago, when tech companies removed just 28 percent of content.

Eighty-nine percent of content flagged as hate speech was reviewed by tech companies within 24 hours, up from 40 percent in 2016, the EU also stated.

The figures come from an evaluation released Monday by the European Commission, the EU's executive arm, as part of its "code of conduct" for social media platforms. Tech companies including Facebook, Google, Twitter and Microsoft signed onto the initiative when it launched in 2016 in an effort to remove racist and xenophobic content from their platforms.

"Today, after two and a half years, we can say that we found the right approach and established a standard throughout Europe on how to tackle this serious issue, while fully protecting freedom of speech," said Vera Jourova, a European commissioner for justice, consumers and gender equality, in a press release.

The EU's report found Facebook now removes 82 percent of illegal hate speech on the platform, up from 28 percent in 2016. The figures are a rare piece of goods news for the social media giant that has struggled to manage misinformation and "fake news" on its platform.

Facebook has struggled to curtail abusive content on its platform and has faced criticism for failing to contain the spread of fake information in election campaigns. Last week the company removed nearly 800 fake pages and accounts with ties to Iran.

"There is always more we can do tackle hate speech and we are delighted that both Facebook and Instagram are now part of the Code of Conduct," a Facebook spokesperson said in a statement to CNBC.

Twitter, meanwhile, showed a slight decrease in the amount of content it took down. The report found 43.5 percent of hate speech flagged on Twitter was removed in that time frame, down from 45 percent in December 2017.

Karen White, Twitter's director of public policy for Europe, told CNBC Monday the company is now reviewing 88 percent of all notifications received within 24 hours.

"We've also enhanced our safety policies, tightened our reporting systems, increased transparency with users, and introduced over 70 changes to improve conversational health," she said. "We're doing this with a sense of urgency and commitment, and look forward to continued collaboration with the European Commission, Governments, civil society and industry."

In a statement to CNBC, Matt Brittin, Google EMEA president, said 10,000 people are now working to fight hate speech on Google's platforms.

"Nobody wants to be confronted with hateful content online," he said. "We'll continue to play our part in the fight against hate by making our platforms as hostile as possible to hate speech."

The European Commission defines "hate speech" as "the public incitement to violence or hatred directed to groups or individuals on the basis of certain characteristics, including race, color, religion, descent and national or ethnic origin."

"Let me be very clear, the good results of this monitoring exercise don't mean the companies are off the hook," Jorouva said in a press conference in Brussels on Monday. "We will continue to monitor this very closely, and we can always consider additional measures if efforts slow down."