Police were called to the scene at about 3.30pm after reports of a one vehicle crash on the B4019 involving a Vauxhall Astra Envoy.
The road was closed from the Stanton Fitzwarren junction and the A419 while they were rescued from the car, which had to be cut open because they were locked in.
A Wiltshire Police spokesman said: “The car had an adult female driver and two children in the back. The doors have locked and they are jammed shut, they can’t get out. We were at the scene just before 3.45pm.
“The fire service were called because the roof had to be cut off.”
The driver had suspected spinal injuries but the children were not injured.
The road closure was expected to last for two hours.