A hysterosalpingogram (HSG) is an X-ray procedure that is used to view the inside of the uterus and fallopian tubes. Oftentimes it is used to see if the fallopian tubes are partly or fully blocked. It can be used to show if the inside of the uterus is of a normal size and shape. HSG is also used a few months after some tubal sterilization procedures (e.g., Essure) to make sure that the fallopian tubes have been completely blocked.
An HSG is not done if you are or could be pregnant. You may be given a urine test to rule out pregnancy. The procedure is also not done if you have a pelvic infection or recent history of pelvic inflammatory disease or heavy uterine bleeding at the time of the procedure.