"These are the first steps towards a great alliance in the name of freedom," Italian Interior Minister Marco Minniti said after a two-day meeting with his Group of Seven counterparts, stressing the role of the internet in extremist "recruitment, training and radicalisation."
French Interior Minister Gerard Collomb said the goal was to ensure pro-jihadist content "is taken down within two hours of it going online".
"Our enemies are moving at the speed of a tweet and we need to counter them just as quickly," acting US Homeland Security Secretary Elaine Duke said.
While acknowledging progress had been made, Britain's Home Secretary Amber Rudd insisted "companies need to go further and faster to not only take down extremist content but also stop it being uploaded in the first place".
Senior executives from the internet giants and Microsoft attended the ministerial session devoted to the issue but did not offer any explanation on how they might go about clamping down on web extremists.
The meeting on the Italian island of Ischia off Naples also focused on ways to tackle one of the West's biggest security threats: jihadist fighters fleeing Syria. The European Union has promised to help close a migration route considered a potential back door for terrorists.
Tens of thousands of citizens from Western countries travelled to Syria and Iraq to fight for the Islamic State group between 2014 and 2016. Some then returned home and staged attacks that claimed dozens of lives.
Minniti warned last week that fighters planning revenge attacks following the recent collapse of the IS stronghold in Raqqa could hitch lifts back to Europe on migrant boats from Libya.
The US and Italy signed an agreement on the sidelines of the G7 meeting to share their fingerprint databases in a bid to root out potential extremists posing as asylum seekers.
The group also said international police agency Interpol -- which currently holds details of nearly 40,000 foreign fighters -- would play a bigger role in information sharing.
Interpol's secretary general Jürgen Stock said the agency's global databases could "act as an 'early warning system' against terrorists and crime threats and help close potential loopholes for terrorists".
Earlier, EU President Donald Tusk promised the bloc would fork out more funds to help shut down the perilous crossing from Libya to Italy -- a popular path for migrants who hope to journey on to Europe.
The EU would offer "stronger support for Italy's work with the Libyan authorities", and there was "a real chance of closing the central Mediterranean route", he said.
Italy has played a major role in training Libya's coastguard to stop human trafficking in its territorial waters, as well as making controversial deals with Libyan militias to stop migrants from setting off.
Minniti said the G7 ministers had discussed how to go about "de-radicalising" citizens returning from the IS frontline, to prevent them becoming security risks in jails.