Is stuttering hereditary?

No. Not hereditary in a mendelian sense, but genetic predisposition has been identified in some families.
Partly. Stuttering is more common in boys, and a strong family history has been noticed in those who continue to stutter over 6 months. Transient (developmental) stuttering is very common in children aged between 2 and 5 when language acquisition is fast. The children who stutter over 6 months, repeat part or whole word, avoid talking, should be referred to specialist.