"There is nothing in any act of terror that offers anything but death," Kerry told journalists in London following a meeting with Saudi counterpart Adel al-Jubeir.
The US politician stressed that terror attacks would not "intimidate nation-states from protecting their citizens and continuing to provide real opportunity, education, jobs, possibilities of a future," and only strengthened resolve to defeat the group.
IS "have proven that they offer nothing, no alternative but their own destruction," he said.
"If that's the choice they leave us, we're going to do what's necessary," he added.
Saudi Foreign Minister Adel al-Jubeir added: "We condemn the terrorist attacks that occurred in Jakarta.
"If anything it should strengthen our resolve to work effectively together to combat the scourge of terrorism," he said.