Thankfully, attacks are rare and it’s more likely that your dog would be the target rather than you. However, these are the tips I can offer (and I hope you will never need them) - buckle up, it’s a long read!
If a dog that is heading towards you looks like it might be about to attack, do not run or scream, and don’t make direct eye contact or show your teeth to the dog (keep it in your line of sight, but don’t look directly into its eyes) and turn 90 degrees if you can, to communicate that you are not a threat and do not want a fight. If it keeps coming towards you, firmly shout SIT or STOP (it may know these commands and obey them). While doing this, try and slip off a shoe if you can (you might need it later!)
If none of this works and the dog then attacks you, do not run or the dog will chase and likely knock you over - they will always be faster than you. You MUST protect your face, neck and abdomen. Put your knee up towards the dog if it lunges at you, as your knee will hit the dog in the chest and knock it away from you (I’ve done this - it works) and continue to fight as hard as you can with whatever you have to hand. If you can offer the shoe you removed earlier as a decoy to bite, do that. If you have a handbag/backpack, use that. Keep your fists closed as a dog can easily bite off your fingers, and use your fists and your feet. Dogs are particularly vulnerable around their chests and ribs - aim for those areas.
If the dog has hold of part of your body, it is unlikely to let go, so avoid trying to yank that body part back or the injury will be far worse. The dog might bite your arms or legs but those bites are less likely to kill you than a bite to the neck. Make yourself look and sound as scary as possible, you don’t need to stay quiet at this point as you are already fighting, so roar like a bigger, scarier animal.
If the dog knocks you to the ground, you are far more vulnerable and it’s no longer a fight as the dog has the upper hand; your focus must be to stay alive. Brace your arms over your head and curl up in the foetal position, protecting your neck and abdomen. Ignore the dog and try to make as little noise as possible - the dog will likely become bored as the ‘hunt’ is over and you are ‘dead’.
Dog on dog attack: if a dog attacks your dog, let your dog off its lead as they’ve a better chance if they can run away. Do NOT attempt to pick your dog up as you could be hurt. If a dog bites your dog, do NOT attempt to pull your dog away or more damage will be done as the aggressor is unlikely to let go. If the aggressor is wearing a flat collar, grab the collar and twist your hands, this will cut off the dog’s air supply and force it to open its mouth to take a breath, letting your dog go. The dog then won’t be able to reach you to bite you as you will be behind it and in control of it.
I know saying ‘stay calm’ sounds crazy and calm is the last thing you would think of being in that moment, but it will give you a much better chance of getting out alive.
If you made it to the end of that - congrats!