Gunmen stormed the Holey Artisan Bakery cafe in Dhaka late on Friday before troops entered almost 12 hours later, BBC reports.
Six attackers were also killed and one was arrested, officials said. Bangladeshi PM Sheikh Hasina has declared two days of national mourning.
At least nine Italians were among those killed, Italy’s foreign minister said.
“There is another person who is missing and could be among the wounded,” Paolo Gentiloni told reporters.
The Italian press said many of those dining at the cafe worked in the garment industry.
Japan said eight of its nationals were in the cafe and seven were still unaccounted for. All were consultants working for Japan’s foreign aid agency.
Japanese Prime Minister Shinzo Abe said the eight “were giving their all for the development of Bangladesh”.
The army had initially said all hostages killed were foreigners, but later reports said some Bangladeshis also died.