* Minister accuses tech firms of "inaction" on extremism
* Says UK could take tax measures unless they improve
* Facebook says minister wrong, already taking action
* Google's YouTube says doing more every day on issue (Adds comments from Facebook, YouTube)
LONDON, Dec 31 (Reuters) - Britain may impose new taxes on tech giants like Google and Facebook unless they do more to combat online extremism by taking down material aimed at radicalising people or helping them to prepare attacks, the country's security minister said.
Ben Wallace accused tech firms of being happy to sell people's data but not to give it to the government which was being forced to spend vast sums on de-radicalisation programmes, surveillance and other counter-terrorism measures.
"If they continue to be less than co-operative, we should look at things like tax as a way of incentivising them or compensating for their inaction," Wallace told the Sunday Times newspaper in an interview.
His quotes did not give further details on tax plans. The newspaper said that any demand would take the form of a windfall tax similar to that imposed on privatised utilities by former Prime Minister Tony Blair's government in 1997.
Wallace accused the tech giants of putting private profit before public safety.
"We should stop pretending that because they sit on beanbags in T-shirts they are not ruthless profiteers," he said. "They will ruthlessly sell our details to loans and soft-porn companies but not give it to our democratically elected government."
Facebook executive Simon Milner rejected the criticisms.
"Mr Wallace is wrong to say that we put profit before safety, especially in the fight against terrorism," he said in an emailed statement. "We've invested millions of pounds in people and technology to identify and remove terrorist content."
YouTube, which is owned by Google, said it was doing more every day to tackle violent extremism.
"Over the course of 2017 we have made significant progress through investing in machine learning technology, recruiting more reviewers, building partnerships with experts and collaboration with other companies," a YouTube spokeswoman said.
Britain suffered a series of attacks by Islamic extremists between March and June this year that killed a total of 36 people, excluding the attackers.
Two involved vehicles ramming people on bridges in London, followed by attackers stabbing people. The deadliest, a bombing at a concert in the northern city of Manchester, killed 22 people.
Following the second bridge attack, Prime Minister Theresa May proposed beefing up regulations on cyberspace, and weeks later interior minister Amber Rudd travelled to California to ask Silicon Valley to step up efforts against extremism.
"We are more vulnerable than at any point in the last 100 years," said Wallace, citing extremist material on social media and encrypted messaging services like WhatsApp as tools that made life too easy for attackers.
"Because content is not being taken down as quickly as they could do, we're having to de-radicalise people who have been radicalised. That's costing millions. They can't get away with that and we should look at all the options, including tax."
Facebook said it removed 83 percent of uploaded copies of terrorist content within one hour of its being found on the social media network.
It also highlighted plans to double the number of people working in its safety and security teams to 20,000 by the end of 2018.
YouTube said that progress in machine learning meant that 83 percent of violent extremist content was removed without the need for users to flag it. (Reporting by Estelle Shirbon, editing by Larry King)