A boy is in a stable condition in a Sydney hospital after he was allegedly stabbed in the chest by a 24-year-old man in northwest NSW.

The 12-year-old was airlifted to Westmead Children’s Hospital after he was stabbed outside a home on Hamilton Pl, Bourke, about 6pm on Monday, police said.

The man was arrested and charged with wounding with intent to cause grievous bodily harm and is due to face Bourke Local Court on Tuesday.