You can protect yourself against hepatitis B infection by avoiding contact with the body fluids of someone whose health and sexual history aren't known to you. To prevent infection:

  • Use a condom when you have sex.
  • Do not share needles.
  • Do not share toothbrushes or razors.
  • Wear latex or plastic gloves if you have to touch blood.
  • Don't get a tattoo unless you are sure the needles have been cleaned properly and are sterile.

Hepatitis B vaccine

The hepatitis B vaccine is the most effective way to prevent infection. The vaccine is up to 95% effective against hepatitis B if you receive all the shots in the vaccination series (3 or 4 shots given at different times).2

The vaccine provides protection against infection for at least 20 years.3 A combination vaccine for hepatitis A and B also is available.

Vaccination is recommended for certain groups of people(What is a PDF document?), such as health professionals, people who have more than one sex partner, and people who have certain illnesses.

Discuss vaccination with your doctor even if you aren't in one of the recommended groups. In the United States, about 15 out of 100 of those who become infected don't know how they got infected.4

In some cases, a doctor will order postvaccination testing to make sure you have developed immunity to the virus. People who need this testing include those who have an impaired immune system or those who are health care workers or sex partners of people who have chronic infection.

If you are exposed to the virus before you have received all of the shots in the vaccination series, you may be given a dose of hepatitis B immunoglobulin (HBIG) soon afterward. In most cases, this will prevent infection until the vaccine takes effect.

If you have had sex with someone who has hepatitis B and you haven't received all doses of the hepatitis B vaccine, you should receive a shot of HBIG-in addition to continuing the vaccine series-within 14 days of being exposed to the virus.

Avoiding spreading the virus if you have it

If you are already infected, you can take steps to prevent spreading the virus to others. This includes not donating blood and not sharing razors or other toiletries.

For more information on prevention, see:

WebMD Medical Reference from Healthwise
This information is not intended to replace the advice of a doctor. Healthwise disclaims any liability for the decisions you make based on this information.© 1995-2015 Healthwise, Incorporated. Healthwise, Healthwise for every health decision, and the Healthwise logo are trademarks of Healthwise, Incorporated.