Johnson signed the new declarations, described by Britain as "a step-change in defence and security co-operation", during visits to both Sweden and Finland on Wednesday.
"What it says is that in the event of a disaster, or in the event of an attack on either of us, then we will come to each other's assistance, including with military assistance," Johnson said at a news conference in Helsinki on Wednesday.
Russia's invasion of Ukraine has forced a rethink of how Sweden and neighbour Finland safeguard national security.
Both are expected to join NATO, but both are worried they would be vulnerable while their applications are processed, which could take up to a year.
Asked if Finland would be provoking Russia by joining NATO, Finnish President Sauli Niinisto said Russian President Vladimir Putin would be to blame for any decision to join the military alliance.
"My response would be that you caused this. Look at the mirror," Niinisto said.
Sweden has also received assurances of support from the United States and Germany.
Speaking earlier alongside the Swedish Prime Minister Magdalena Andersson, Johnson said: "The war in Ukraine is forcing us all to make difficult decisions. But sovereign nations must be free to make those decisions without fear or influence or threat of retaliation."
Britain said the new arrangements would intensify intelligence sharing and accelerate joint military training, exercises and deployments.
Johnson said the nature of any assistance will "depend on the request of the other party". But he said NATO was a defensive alliance.
"NATO poses no threat to anyone. It is there for the purposes of mutual defence," he said at the news conference in Helsinki.