What is an HSG test? Learn how it checks your fallopian tubes and uterus, when it is done, how to prepare, whether it hurts, risks and when to call.
Written by the Fertility Cloud medical team. Medically reviewed by Dr. Gary Levy, board-certified reproductive endocrinologist and infertility specialist. Last reviewed: 15 November 2026.
Short answer: A hysterosalpingogram (HSG) is an X-ray that shows whether your fallopian tubes are open and whether the inside of your uterus is normal. It takes about 5 minutes, is done after your period and before ovulation, usually causes mild to moderate cramping, and is generally safe.
Part of our topic hub: Endometriosis, Adenomyosis, Uterine and Tubal Problems.
Why you might need one
An HSG is often one of the first tests in a fertility evaluation. It can show whether the tubes are blocked and reveal differences in the uterine cavity. Tubal factors account for about 25 to 35 percent of female infertility, according to a clinic summary of ASRM data.
When it is done
It is scheduled after your period ends and before you ovulate, often between cycle days 5 and 10. This also helps make sure you are not pregnant. Your clinic may do a pregnancy test first if your cycles are irregular.
How to prepare
- Take an over-the-counter pain reliever such as ibuprofen about an hour before, as your clinic advises.
- Avoid intercourse around the test if your clinic asks.
- Tell your doctor about any allergy to contrast dye or iodine, and any history of pelvic infection.
- Your clinic may prescribe an antibiotic.
What happens
A thin catheter is placed through the cervix, contrast dye is injected into the uterus, and X-ray images show whether the dye fills the uterus and flows through the tubes. The test takes about 5 minutes. Many practices give results the same day.
Does it hurt?
Most people have mild to moderate cramping. Pain relief taken ahead helps, and some doctors offer a local anesthetic. You may feel light-headed for a short time.
After the test
Spotting for 1 to 2 days is common, and most people go back to normal activities right away.
Risks
An HSG is generally safe. There is a small risk of an allergic reaction to the contrast, a pelvic infection or fainting. The radiation dose is very low. Call your clinic right away for heavy bleeding (soaking more than a pad or tampon an hour, or bleeding for more than 4 days), a fever of 100.5 F (38 C) or higher, or bad or increasing belly pain.
What an HSG cannot show
An HSG cannot identify endometriosis or show whether your ovaries are working normally. If the tubes look blocked, your doctor may repeat the test or suggest another test to confirm.
Frequently asked questions
Can an HSG help me get pregnant?
Some studies suggest a small rise in fertility for a few months after an HSG with open tubes, but whether the test enhances fertility is debated.
Should I have an HSG done by a fertility specialist?
It can be done by a gynecologist or a radiologist. Ask your fertility doctor where they recommend.
Can I have an HSG if I might be pregnant?
No. Tell your doctor if there is a chance you are pregnant.
What if my HSG shows a blocked tube?
Your doctor may repeat the test and discuss options such as IUI with the open tube or IVF.
Sources
- University of Washington: About Your Hysterosalpingogram (2025)
- WebMD: Hysterosalpingogram
- Ro: HSG tests
- InVia Fertility: HSG (citing ASRM)