A Malaysian boy on holiday was killed in front of his mother and two cousins when he was pinned to a school fence by a car that had mounted the footpath and hit the group as they walked to school.

The six-year-old boy died at the scene near the corner of Rickard Street and Marsden Road at the suburb of Carlingford, near Carlingford Public School in the city's northwest, shortly after 9.20am Wednesday.

According to the Australian Associated Press, the boy and his mother were walking to the school with their two cousins, aged four and five, and two other children, both girls, when the car ploughed into them.

The 38-year-old woman, a Malaysian national, was taken to Westmead Hospital with non life-threatening injuries while her four-year-old niece was taken to The Children's Hospital at Westmead with a fractured pelvis.

The driver of the vehicle, a 46-year-old Carlingford woman, was taken to hospital suffering shock and was to undergo mandatory blood and urine testing.

Two young children who were with the woman in the car were uninjured. It is the final day of school for New South Wales public schools. Police have established a crime scene and will prepare a report for the coroner.