Diplomats, politicians and people from across the different strata of society paid tributes and placed wreaths during the ceremony at the Bangladesh Army Stadium in Dhaka cantonment which drew a huge crowd despite drizzle.
Islamist militants hacked to death 20 hostages after they stormed a cafe popular with expatriates and diplomats in Dhaka's diplomatic zone on Friday.
At the ceremony, the caskets, bearing the flags of India, Italy, Bangladesh, Japan and the US -- signifying the nationalities of the foreigners killed -- were placed on a raised platform.
Autopsy on the bodies had been conducted earlier at the Combined Military Hospital (CMH) in Dhaka.
Also Read
Of those killed, 18 were foreigners -- Nine Italians, 7 Japanese, one American of Bangladeshi-origin and an Indian, 19-year-old Tarishi Jain, were among those killed. Two other Bangladeshis were also among the hostages slaughtered.
The bodies of two Bangladeshis and one Bangladeshi-born US citizen were handed over to the relatives for subsequent rituals and burial after the ceremony that was held on the second day of the two-day nationwide mourning declared in the country.
Islamic State has claimed responsibility for the killing of the hostages, mostly foreigners, and two police officers during the 12-hour siege that ended on Saturday after the army stormed the Holey Artisan Bakery, killing six attackers and capturing one alive.
However, Bangladesh has blamed "homegrown" Islamist terrorists and Pakistan's spy agency ISI for the country's worst terror attack, ruling out the role of the Islamic State.