You scratch your dog's neck, and they turn to put your hand in their mouth. Some dogs get excited during touch and play with their mouths. Others are trying to end handling. The difference matters more than the label "nippy."
Pause the petting. Does your dog move closer with a loose body, or turn away, stiffen, pin their ears, or show the whites of their eyes? If they seem uncomfortable, let them leave and do not keep reaching. A new touch sensitivity, a bite that breaks skin, or signs of pain deserve veterinary advice. For hard or repeated biting, seek qualified behavior support and manage contact safely, especially around children.
Make petting optional
Offer a brief stroke when your dog approaches, then stop. If they come back and lean in, you can continue for a moment. If they walk off, respect that answer. Avoid rough hand play that blurs the line between petting and wrestling. When your dog is playful and mouthy, pause and offer a suitable toy rather than making hands the game.
Notice timing. Does mouthing begin only after a minute of touch, when they are resting, or when someone pats their head? Shorter, gentler interaction may solve more than teaching a cue. Do not hold their muzzle closed or punish a warning, that can turn a communication problem into a safety problem.
Your dog can like you deeply and still dislike a particular kind of touch. Let their response shape how you greet them. Once pain is considered and you have stopped touch your dog does not want, the dog handling and reward-timing guide can help you notice and reward comfortable contact.
Sources: ASPCA: Mouthing, Nipping and Play Biting in Adult Dogs. Dogs Trust: How to handle your dog.