Vomiting blood (haematemesis) could be a sign of a serious problem .
You should go to your GP surgery or nearest A&E department.
The amount and colour of blood can vary. For example:
Keep a small sample of the vomit to show a GP or the doctor treating you. It will give them a better idea of what's wrong.
Unless you're generally well and the cause is obvious to a doctor – for example, you have swallowed blood from a nosebleed – you should be admitted to hospital straight away for tests.
It's important to confirm whether the blood you've vomited has come from your stomach or food pipe (oesophagus) or if you have coughed it up from your airways or lungs.
Find out more about coughing up blood.
If you vomit blood, it means there may be bleeding somewhere in your food pipe, stomach or the first part of your small intestine (duodenum).
This is a summary of the most likely causes of blood in vomit. Do not use this list to diagnose yourself – always see a GP or go to A&E.
Bleeding happens when the ulcer or inflammation damages an artery.
Oesophageal varices are enlarged veins in the lower part of the food pipe (oesophagus). They bleed, but do not usually cause any pain.
They're often caused by alcoholic-related liver disease. If a GP or A&E doctor suspects oesophageal varices are the cause of blood in your vomit, you'll need to be admitted to hospital immediately.
Gastro-oesophageal reflux disease (GORD) is where acid leaks out of the stomach and up into your food pipe (oesophagus).
If you have severe GORD, the acid can irritate the lining of your oesophagus and cause bleeding.
Prolonged retching can tear the lining of your oesophagus, which can also result in bleeding.
It's possible to swallow blood in certain circumstances – for example, after a severe nosebleed.
These conditions may also cause you to have blood in your poo, which can make it look black and like tar.
Less commonly, blood in your vomit may be caused by: