Basir Mujahid, a spokesman for Kabul police, said several people were killed and wounded in the blast near the fortified entrance to the German embassy.
"It was a car bomb near the German embassy, but there are several other important compounds and offices near there too. It is hard to say what the exact target is," Mujahid said.
"There are also injured people in the German embassy but they are mostly lightly injured," German Foreign Minister Sigmar Gabriel said in Berlin. "Among the fatalities are most likely Afghan security personnel who were employed at the German embassy."
French embassy in Kabul has been damaged in the attack, but there were no signs yet of any French victims, according to French Minister Marielle De Sarnez.
Turkish embassy building damaged as well, personnel unharmed.
Japan's Foreign Ministry said two of its embassy employees, both Japanese nationals, were slightly injured in the bombing.
The explosion shattered windows and blew doors off their hinges in houses hundreds of meters (yards) away.
There was no immediate claim of responsibility for the blast. A spokesman for Taliban insurgents said he was gathering information.
Violence around Afghanistan has been rising throughout the year, as the Taliban push to defeat the US-backed government and reimpose Islamic law after their 2001 ouster in a Washington-backed invasion.
Since most international troops withdrew at the end of 2014, the Taliban have gained ground and now control or contest about 40 percent of the country, according to US estimates, though President Ashraf Ghani's government holds all provincial centers.
US President Donald Trump is due to decide soon on a recommendation to send 3,000 to 5,000 more troops to bolster the small NATO training force and US counter-terrorism mission now totaling just over 10,000.
The commander of US forces in Afghanistan, General John Nicholson, told a congressional hearing earlier this year that he needed several thousand more troops to help Afghan forces break a "stalemate" with the Taliban.