Hyperventilation is caused by breathing out more carbon dioxide than is produced. This can upset the pH balance in the blood and can cause faintness.

For dogs, it is very important that they be able to pant for the purpose of thermo-regulation, because dogs don't sweat like humans do. 

The panting increases evaporative water loss which cools the body. When dogs pant, they take very shallow breaths to avoid throwing off their CO2 balance. 

Much of the air is confined to the upper respiratory system, a "dead space" that includes parts of the trachea and other areas that do not participate in gas exchange. 

Dogs also have a very elastic diaphragm that reduces the muscular work requirements for breathing when they pant at a certain rate. 

That energy efficiency is important because if panting required lots of muscle use, then the body would produce more heat rather than ridding the body of heat

What keeps a panting dog from hyperventilating?

Panting in dogs tends to be shallow breaths and they're not moving a ton of air, which prevents them from blowing off all their carbon dioxide (CO2) and getting respiratory alkalosis (high blood pH which causes an acid/base imbalance). But not always... dogs that are taking fast, deep breaths will suffer from the same hyperventilation syndrome as people. 

The body is more sensitive to a build-up of CO2 to tell us when to breathe than a lack of oxygen. 

Hyperventilating causes you to expel more CO2 than usual which will cause your body to stop signaling you to take a breath and you won't get sufficient oxygen. 

It also causes alkalosis where the blood pH increases. 

A dog panting regularly isn't moving more air than a dog taking in slower, deep breaths, so hyperventilation isn't an issue. 

The issue comes when there is labored breathing or heavy panting, which will cause these issues. 

Dogs are also more prone to aerophagia, where they gulp air while panting heavily and distend out their stomachs. Aerophagia can rarely lead to bloat, but can be quite uncomfortable. 

Why do dogs not hyperventilate whilst panting?

Dogs don't have sweat glands on their skin, and the reason why they pant is regulate their temperature. 

The difference between hyperventilation and panting is the amount of carbon dioxide released. 

Hyperventilation occurs when you breathe out more carbon dioxide than you can make, and although that sounds good, it's not.

Although excessive hyperventilation is bad, it can be done in short bursts with little consequence. 

Since panting is a voluntary action, they can change their breathing pattern to compensate and cut down on the panting if they lose too much carbon dioxide.

How do dogs avoid hyper-ventilation when they pant?

First of all it not possible for a dog's blood to be supersaturated with oxygen by just breathing room air regardless how fast they are breathing. 

There is only about 21% of oxygen in room air, people use about 3%. (If I remember correctly) meaning we exhale 18% oxygen. 

A dog would have to breath 100% oxygen for a long period of time in order have its blood over-saturated with oxygen.

The second thing is that hyperventilation is not always dependent on how fast your dog is breathing. 

How much your dog ventilates (how well he moves gas in and out of his lungs) is determined how much carbon dioxide he breathes out of his lungs. 

Your dog would be considered hyperventilating if he was breathing out more carbon dioxide because of deep (a lot of gas going in and out with each breath), rapid breathing. 

When a dog is panting he is breathing rapidly but his breathing tends to be shallow (less gas going in and out with each breath) therefore preventing too much gas (carbon dioxide) from leaving the lungs.

The exact opposite would happen if he was taking as shallow breaths when panting but was breathing more slowly. 

In this instance he would be hypo ventilating because too little carbon dioxide would be leaving his lungs because of the reduced amount of carbon dioxide leaving the lungs which would be detrimental to his health as well.

The other part to this is that there is part of each breath which does not take part in gas exchange. 

This is that part of the breath which only reaches the upper airways rather than the lungs. 

This part of the airway is called the dead space and so what panting does is move air in and out of the dead space which because it doesn't reach the lungs doesn't drop the CO2

How does hyperventilation relate to dog anxiety?

Anxiety itself doesn't cause hyperventilation so much as panic attacks do. It's a two-parter, really.

Anxiety or being nervous is attributed to the body preparing itself by generating energy and motivation to respond to an issue.

Hyperventilation is 'a process that occurs when the rate and quantity of alveolar ventilation of carbon dioxide exceeds dogs body's production of carbon dioxide. 

Hyperventilation can be voluntary or involuntary.'

Due to the body responding to the stress your have adrenaline and other messages responding to the issue that is causing the anxiety, this creates a variance in blood pressure which may cause the mismanagement of CO2; hence hyperventilation may occur in this instance.

Is hyperventilating normal?

Yes. But if it happen a lot then the dog may be distress and it may be a problem. 

You need to take your dog to the vet and bring it up at his vet visit to make sure his extra time having his lungs and heart listened to. 

How to stop hyperventilation?

For dog hyperventilating treatment I would recommend you try is Adaptil, it is an over the counter air diffuses that releases pheromones into the air. 

It is supposed to relax your dog. I believe they also make collar versions. They sell it at a lot of vet clinics

I will also recommend you use a thunder shirt sport anxiety jacket to calm your dg down especially if they dog loves blanket. 

I had a friend who used this before on his dog and it was very helpful.

But if all this treatments options fail, the best option for you is still to see your vet because it may be possible your dog may be suffering from an ailment.