A three-year-old boy is in a NSW hospital with serious arm and leg injuries after being dragged under a ride-on lawnmower driven by his grandfather, police say.

The boy was visiting his grandparents at their Manildra property near Orange when he wandered into the front yard about 6pm yesterday.

His 66-year-old grandfather, who was testing the ride-on mower, was unaware the boy was nearby and the machine hit his grandson who then fell underneath, police said.

Police said the boy was taken to Orange Health Service before being transferred to Sydney's Children's Hospital suffering serious arm and leg injuries, but the injuries did not appear life-threatening.