An upper GI procedure is a set of imaging and endoscopic tests that look at the esophagus, stomach, and first part of the small intestine. The most common version, an upper GI series, uses X-rays and a chalky liquid called barium to make those organs visible. A related test, upper endoscopy, uses a thin camera instead. Prep usually means not eating or drinking for several hours beforehand, and the main risks are mild bloating or constipation from barium, or a rare complication from endoscopy such as bleeding or a reaction to sedation.
What Is An Upper GI Procedure and What Does It Examine?
The upper GI tract runs from your mouth down through your esophagus, into your stomach, and into the duodenum, which is the first section of the small intestine. An upper GI procedure is any test that lets a doctor see this route.
Two procedures carry the “upper GI” label, and people often confuse them.
- Upper GI series (barium swallow): You drink a contrast liquid, then X-rays track it as it moves through your upper digestive tract. Some versions use a fizzy powder to stretch the stomach with air, which is called a double-contrast study.
- Upper endoscopy (esophagogastroduodenoscopy, or EGD): A flexible tube with a camera passes through your mouth and down your throat so the doctor can look directly at the lining and take tissue samples if needed.
Doctors order these tests to investigate swallowing trouble, persistent heartburn, stomach pain, nausea, vomiting, unexplained weight loss, or bleeding in the upper digestive tract. An upper GI series is good at showing the shape and movement of the tract. Endoscopy is better at spotting inflammation, ulcers, and small growths, and it can biopsy tissue on the spot. Neither test replaces the other in every situation.
What Are the Steps in an Upper GI Procedure?
The steps differ between the X-ray version and the camera version, so it helps to know which one you are having.
Upper GI series steps
You change into a gown and stand or sit in front of an X-ray table. You drink the barium liquid while a technologist or radiologist takes images. The table may tilt you into different positions so the liquid coats the stomach lining evenly.
The study usually takes 20 to 30 minutes, but it can run longer if the barium moves slowly. You may be asked to hold still or hold your breath for short bursts.
Upper endoscopy steps
You lie on your side. The doctor gives you sedation through an IV, usually a drug that makes you relaxed and sleepy. A mouth guard protects your teeth, and the scope goes in through your mouth.
The exam itself often takes 15 to 30 minutes. The doctor may take small tissue samples, which is painless. You then recover for a while until the sedation wears off. Someone else needs to drive you home.
How Do You Prepare for an Upper GI Procedure?
Preparation mostly comes down to an empty stomach. For most upper GI procedures, you stop eating and drinking for a set number of hours before the test. Your care team gives you the exact timing, and you should follow their instructions rather than a general rule you found online.
A few other points matter:
- Tell them about pregnancy. The upper GI series uses X-rays, so let the staff know if you are or might be pregnant. They may choose a different test.
- List your medications. Blood thinners and some diabetes drugs can affect endoscopy planning. Do not stop any prescription on your own; ask the prescribing doctor.
- Arrange a ride. If you are having sedation for endoscopy, you cannot drive yourself home.
- Plan for the barium. Drink plenty of water afterward to help move the barium through your system. It can cause constipation, and staying hydrated helps.
One non-obvious point: for a barium study, the timing of your last meal matters more than many people expect, because food residue in the stomach can blur the images. If you eat when you were told not to, the test may need to be rescheduled.
What Are the Risks and Side Effects?
The risks are generally low, but they are real and differ by procedure type.
For an upper GI series, the main issues are:
- Bloating, cramping, or a feeling of fullness from the barium or air
- Constipation, and in rare cases a blockage if the barium does not pass, which is a bigger concern for people already prone to severe constipation
- Exposure to a small amount of radiation, which is a consideration mainly for pregnant people
For upper endoscopy, the risks include:
- Sore throat or mild bloating afterward
- Reactions to sedation, such as breathing problems or a drop in blood pressure, which is why monitoring during recovery matters
- Bleeding or, rarely, a tear in the lining of the esophagus or stomach, which is uncommon but can require treatment
Some people worry about the barium itself. It is not absorbed into the body the way nutrients are; it passes through and out in your stool, often lightening its color for a day or two. That color change is expected, not a sign of a problem.
If you develop severe abdominal pain, vomiting, or cannot pass stool or gas after a barium study, contact your doctor promptly. These are uncommon but worth knowing.
How Does an Upper GI Series Compare With Upper Endoscopy?
The two tests answer different questions, and the choice depends on what your doctor needs to know.
| Feature | Upper GI Series | Upper Endoscopy |
|---|---|---|
| How it works | X-rays with barium contrast | Flexible camera scope |
| Sedation | Usually none | Usually sedation |
| Can take tissue samples | No | Yes |
| Best for | Shape, movement, and structure of the tract | Lining, inflammation, ulcers, and biopsy |
| Typical duration | About 20 to 30 minutes | About 15 to 30 minutes |
| Main side effects | Bloating, constipation | Sore throat, sedation effects |
Neither test is “better” in a general sense. A doctor might start with an upper GI series when swallowing problems or structural issues are the concern, and choose endoscopy when direct viewing or a biopsy is needed. Sometimes both are used.
When Should You Get Medical Help After the Procedure?
Most people feel back to normal within a day. Call your doctor if symptoms suggest something more than routine recovery.
Seek prompt care for severe or worsening abdominal pain, vomiting that will not stop, black or bloody stools, fever, chest pain, or trouble breathing. After endoscopy, also report any difficulty swallowing that persists or pain that gets worse rather than better.
These warning signs are uncommon, but they are the ones your care team wants to hear about. When in doubt, call. It is better to check than to wait.
What Should You Expect During Recovery?
Recovery is usually short. After an upper GI series, you can typically eat and drink normally once the study is done, though you may feel full for a while. Drink extra water to help clear the barium.
After endoscopy, you rest until the sedation fades, which often takes an hour or so. You may feel groggy, and you should not drive, operate machinery, or make important decisions until the effects wear off. A mild sore throat is common and usually settles within a day or two.
Your doctor reviews the results with you, sometimes the same day and sometimes at a follow-up visit. If tissue samples were taken during endoscopy, those results take longer to come back.
Frequently Asked Questions
How long do you have to fast before an upper GI procedure?
Most upper GI procedures require you to stop eating and drinking for several hours beforehand, and your care team gives the exact timing. Follow their instructions rather than a general rule, since the right window depends on the specific test.
Is an upper GI procedure painful?
An upper GI series is not painful, though the barium can feel heavy or cause bloating. Upper endoscopy is usually done with sedation, so most people do not feel pain during it and may have only a mild sore throat afterward.
Can I drive myself home after an upper GI procedure?
You can usually drive yourself home after an upper GI series, which does not use sedation. After an upper endoscopy with sedation, you cannot drive and need someone else to take you home.
What are the most common side effects of a barium swallow?
The most common side effects are bloating, cramping, and constipation, along with light-colored stool for a day or two. Drinking plenty of water afterward helps the barium pass through your system.

