The man killed was reportedly a soldier. Authorities said the suspects were motivated by ideology of radical Islam.
The men were shot and captured by police shortly afterward.
"I condemn in the strongest terms the appalling attack against a British service member in Woolwich on May 22," Obama said in a statement on Thursday. "The United States stands resolute with the United Kingdom, our ally and friend, against violent extremism and terror. There can be absolutely no justification for such acts, and our thoughts and prayers are with the family of the victim, the police and security services responding to this horrific act and the communities they serve, and the British people."
Obama also mentioned his trip to the United Kingdom in June.
"Our special relationship with the United Kingdom is especially important during times of trial, and I look forward to my trip to the United Kingdom to participate in the June G-8 Summit, hosted by Prime Minister Cameron, which will include discussions on the important global security challenges our countries face together," Obama added.
Details are still scarce on the attack and authorities are hoping to question the suspects as soon as possible for any links to al Qaeda or other terrorist networks.