What Is a Dye Test for Fertility and How Does It Work?

A dye test for fertility is an imaging procedure that checks whether your fallopian tubes are open and whether your uterus has a normal shape. The most common version is called a hysterosalpingogram, or HSG. A doctor injects a special contrast dye through your cervix into your uterus, then takes X-ray images as the dye flows through your fallopian tubes. If the dye spills freely out the ends of both tubes, they’re open. If it stops partway or doesn’t enter a tube at all, there may be a blockage preventing eggs and sperm from meeting.

The test is one of the first steps in a fertility workup because tubal problems and uterine abnormalities account for a significant share of infertility cases, and this single procedure can screen for both at once.

How the Procedure Works

You’ll lie on an X-ray table, similar to a standard pelvic exam position. The doctor places a speculum, cleans the cervix, and inserts a thin catheter. Through that catheter, about 1 to 3 mL of contrast dye is slowly injected into the uterine cavity. A fluoroscopy machine captures a series of X-ray images as the dye moves. The key images show the dye first filling the uterus (revealing its shape), then traveling through each fallopian tube, and finally spilling out the far ends of the tubes into the pelvic space.

The entire procedure typically takes 15 to 30 minutes. You don’t need general anesthesia, and it’s done in a radiology suite or clinic rather than an operating room.

What It Can Detect

The primary goal is checking whether your fallopian tubes are open, which doctors call “tubal patency.” When dye spills freely into the pelvic cavity at the end of each tube, that tube is confirmed open. If the dye stops short or a tube doesn’t fill at all, the blockage could be temporary (from a spasm) or permanent (from scar tissue, infection damage, or endometriosis). A single test can’t always distinguish between the two, so a blocked result sometimes warrants a follow-up.

Beyond the tubes, the dye outlines the inside of the uterus, which can reveal structural problems. Studies show HSG detects uterine abnormalities in roughly 20% of women being evaluated for infertility. These include fibroids pushing into the uterine cavity, polyps, and septums (a wall of tissue dividing the uterus). While HSG picks up these issues, a direct camera exam called hysteroscopy is often needed to confirm and treat them.

Types of Fertility Dye Tests

The classic HSG uses iodine-based contrast dye and X-ray imaging, but it’s not the only option. An ultrasound-based alternative called HyCoSy (hystero-contrast sonography) uses a foam or saline contrast agent viewed on ultrasound instead of X-rays. HyCoSy results correlate well with surgical findings, avoids radiation exposure, and allows the doctor to examine the pelvis with ultrasound at the same time. The UK’s National Institute for Health and Clinical Excellence recommends it as a first-line option for women without a known history of tubal damage.

The gold standard for evaluating the tubes is a surgical dye test called chromotubation, performed during laparoscopy. A surgeon injects colored dye through the cervix while directly watching the tubes through a small camera in the abdomen. Because it requires anesthesia and surgery, it’s reserved for cases where less invasive tests are inconclusive or when surgery is already planned for another reason, such as treating endometriosis.

When It’s Scheduled

The test is performed during the first half of your menstrual cycle, between days 1 and 14 (day 1 being the first day of your period). This timing serves two purposes: it minimizes the chance you could be pregnant, and the uterine lining is thinner early in the cycle, making it easier to see the cavity clearly. Your doctor may ask you to take a pregnancy test beforehand and, in some cases, prescribe a short course of antibiotics as a precaution against infection.

What the Pain Feels Like

Between 72% and 80% of women report mild to moderate pain during an HSG, and about 59% describe the experience as very stressful. The most painful moment is when the dye is injected. The sensation is similar to strong menstrual cramps, caused partly by the uterus and tubes stretching as they fill and partly by a local release of prostaglandins (the same chemicals responsible for period cramps).

In studies measuring pain on a 0-to-10 scale, women who took only an over-the-counter anti-inflammatory beforehand rated the dye injection step around 7 out of 10 on average. When doctors applied a numbing cream to the cervix in addition to the anti-inflammatory, that score dropped by nearly half, to about 3.8. Your doctor may recommend taking an NSAID like ibuprofen or naproxen about an hour before the procedure. If you’re concerned about pain, ask whether a local anesthetic option is available at your clinic.

Water-based contrast dye tends to cause more discomfort than oil-based dye because it’s thinner and distends the tubes more quickly.

Recovery After the Test

Most women can return to normal activities the same day, though mild cramping and light spotting are common for a day or two. You may notice some watery discharge as the remaining dye drains out. Serious complications are rare, but contact your doctor if you develop a fever, heavy bleeding, or worsening pelvic pain in the days following the procedure, as these could signal an infection.

The Surprising Fertility Boost

One of the more interesting aspects of an HSG is that it may temporarily improve your chances of getting pregnant. The dye itself appears to flush out minor debris or mucus plugs from the tubes, and some researchers believe it creates a more favorable environment in the uterine lining. This effect has been studied most closely with oil-based contrast dye, which increased clinical pregnancy rates by about 29% compared to water-based dye in a pooled analysis of multiple studies. The benefit seems to emerge over several months of follow-up rather than immediately.

This doesn’t mean an HSG is a fertility treatment on its own, but many doctors consider the months right after the test a good window to try conceiving naturally before moving on to more involved interventions.

How Accurate the Results Are

HSG is good at confirming open tubes but less reliable at diagnosing blockages. A meta-analysis found it has a sensitivity of about 65% and specificity of about 83% for detecting tubal obstruction. In practical terms, that means it catches roughly two-thirds of actual blockages and correctly identifies open tubes most of the time, but it does produce a notable rate of false positives. A tube can appear blocked simply because it spasmed during the test or because the dye didn’t flow evenly. For this reason, a single abnormal result often leads to a repeat test or a laparoscopic evaluation rather than an immediate change in treatment.

Women with a history of pelvic inflammatory disease, ectopic pregnancy, or endometriosis may be better served by going directly to laparoscopy or HyCoSy, since these conditions make HSG results less reliable and the surgical approach can diagnose and treat problems simultaneously.