Nairobi police chief Moses Nyakwama said the blast occurred on a so-called "matatu", or local minibus, in the district of Eastleigh, where mainly Somalis or Kenyans of Somali origin live and which has been the target of other attacks in recent weeks.
"The information we have is that there were about 25 people in the bus. It looks like it is an improvised explosive device that was thrown in it," he said.
"It occurred at a congested place so even people passing by got injured."
The Kenyan Red Cross said on its Twitter account that the death toll was now seven people while the number of wounded was 29.
Kenya has suffered a wave of grenade and gun attacks, often blamed on sympathisers of Somalia's Shebab Islamist insurgents, since its army went into Somalia last year to flush out al-Shabab. The Eastleigh area has often been a target of the violence.
On Wednesday, a suspected grenade attack in a supermarket in the district wounded one person, and two weeks earlier another explosive device went off, wounding two.
Earlier this month, attackers also hurled a grenade into a church in the northeastern town of Garissa, close to the Somali border, killing one policeman and wounding 14 people. – Sapa-AFP