A US military spokesman said the car exploded in the northern section of the city, 180km north of Baghdad, on Tuesday.
He said the 17 civilian casualties were taken to hospital and the US soldiers were evacuated.
In a separate attack, a rocket-propelled grenade was fired at a US tank in the town, wounding one US soldier, a spokesman from the US 1st Infantry Division said.
A hospital official in Baiji said a child and three traffic police were among the wounded.
Baiji, site of a major oil refinery, has seen a surge in violence over the past three weeks, since US forces launched their offensive on Falluja.
US tanks and armoured vehicles, backed by helicopters, launched an assault on parts of Baiji two weeks ago to suppress anti-American fighters believed to be hiding out there.
Since then there have been frequent clashes between US forces and suspected fighters in the town.
A group has claimed responsibility
A roadside bomb was also detonated near a US military patrol in northern Iraq overnight, killing an American soldier, the US military said on Tuesday.
The attack occurred near the town of Alazu, north of Baghdad, and targeted soldiers from the US 1st Infantry Division. No further details were provided.
At the same time, a group calling itself Martyr Abd Allah Azzam Brigades has claimed responsibility for targeting a US military patrol.
Aljazeera received a videotape showing an explosive device detonating near a US military convoy in al-Ridwaniya district, southwest of Baghdad, destroying a vehicle.
The fate of the soldiers inside the vehicle is not known.