This is done before donating blood or having a blood transfusion, to check what your blood group is.
If you were given blood that didn't match your blood group, your immune system may attack the red blood cells. This could lead to potentially life-threatening complications.
Blood typing is also used during pregnancy, as there's a small risk the unborn child may have a different blood group from their mother. This could lead to the mother's immune system attacking her baby's red blood cells. This is known as rhesus disease.
If you don’t already know your blood type, your blood will be tested at least once during your pregnancy to determine if there’s a risk of rhesus disease.
If testing reveals there is a risk of rhesus disease, an injection of a medicine that stops the mother's immune system attacking her baby's blood cells can be given.
Find out more about blood tests during pregnancy
Read more about blood typing