An X-ray is a quick, painless test that produces images of the structures inside your body — particularly your bones.

X-ray beams can pass through your body, but they are absorbed in different amounts depending on the density of the material they pass through. Dense materials, such as bone and metal, show up as white on X-rays. The air in your lungs shows up as black. Fat and muscle appear as varying shades of gray.

For some types of X-ray tests, a contrast medium — such as iodine or barium — is introduced into your body to provide greater detail on the X-ray images.

X-ray technology is used to examine many parts of the body.

Bones and teeth

Fractures and infections. In most cases, fractures and infections in bones and teeth show up clearly on X-rays.

Arthritis. X-rays of your joints can reveal evidence of arthritis. X-rays taken over the years can help your doctor determine if your arthritis is worsening.

Dental decay. Dentists use X-rays to check for cavities in your teeth.

Osteoporosis. Special types of X-ray tests can measure the density of your bones.

Bone cancer. X-rays can also reveal tumors in your bones.

Chest

Lung infections or conditions. Evidence of problems such as pneumonia, tuberculosis or lung cancer can show up on chest X-rays.

Breast cancer. Mammography is a special type of X-ray test used to examine breast tissue.

Enlarged heart. One of the signs of congestive heart failure is an enlarged heart, which shows up clearly on X-rays.

Blocked blood vessels. Injecting a contrast material that contains iodine can help highlight sections of your circulatory system so that they can be seen on X-rays.

Abdomen

Digestive tract problems. Barium, a contrast medium delivered in a drink or in an enema, can help reveal problems anywhere in your digestive system.

Swallowed items. If your child has swallowed something like a key or a coin, an X-ray can show the location of that object.

Radiation exposure

Some people worry that X-rays aren't safe because radiation exposure can cause cell mutations that may lead to cancer. But the amount of radiation you're exposed to during an X-ray is so small that the risk of any damage to cells in your body is extremely low.

However, if you're pregnant or suspect that you may be pregnant, tell your doctor before having an X-ray. Though the risk of most diagnostic X-rays to an unborn baby is small, your doctor may consider another imaging test, such as ultrasound.

Contrast medium

In some people, the injection of a contrast medium can cause side effects such as:

A feeling of warmth or flushing

A metallic taste in the mouth

Lightheadedness

Nausea

Itching

Hives

Rarely, severe reactions to a contrast medium occur, including:

Severe low blood pressure

Anaphylactic shock

Cardiac arrest

Different types of X-rays require different preparations. Ask your doctor or nurse to provide you with specific instructions.

What to wear

In general, you undress whatever part of your body needs examination. You may wear a gown to cover yourself during the exam, depending on which area is being X-rayed. You may also be asked to remove jewelry, eyeglasses and any metal objects that may obscure the X-ray image, because these objects can show up on an X-ray.

Contrast material

Before some types of X-rays you're given a liquid called contrast medium. Contrast mediums, such as barium and iodine, help outline a specific area of your body on the X-ray image. You may swallow the contrast medium, or receive it as an injection or an enema.

During the X-ray

X-rays may be performed at doctors' offices, dentists' offices, emergency rooms and hospitals — wherever an X-ray machine is available. The machine produces a tiny burst of radiation, at a safe level, that passes through your body and records an image on a specialized plate. You can't feel the X-ray passing through you.

A technologist positions your body to obtain the necessary views. He or she may use pillows or sandbags to help you hold the proper position. During the X-ray exposure, you remain still and hold your breath to avoid moving, which can cause the image to blur.

An X-ray procedure may take only a few minutes for a bone X-ray, or more than an hour for more-involved procedures, such as those using a contrast medium.

Your child's X-ray

If a young child is having an X-ray, restraints or other immobilization techniques may be used to help keep him or her still. These will not harm your child and will prevent the need for a repeat procedure, which may be necessary if the child moves during the X-ray exposure. You may be allowed to remain with your child during the test. If you remain in the room during the X-ray exposure, you're typically asked to wear a lead apron to shield you from unnecessary exposure.

After the X-ray

After an X-ray, you generally can resume normal activities. Routine X-rays usually have no side effects. However, if you receive an injection of contrast medium before your X-rays, call your doctor if you experience pain, swelling or redness at the injection site. Ask your doctor about other signs and symptoms to watch for pertaining to your specific X-ray procedure.

X-rays are saved digitally on computers. Digital images can be viewed on-screen within minutes. A radiologist typically views and interprets the results and sends a report to your doctor, who then explains the results to you. In an emergency, your X-ray results can be made available to your doctor in minutes.

Reprint Permissions

A single copy of these materials may be reprinted for noncommercial personal use only. "Mayo," "Mayo Clinic," "MayoClinic.org," "Mayo Clinic Healthy Living," and the triple-shield Mayo Clinic logo are trademarks of Mayo Foundation for Medical Education and Research.