How to Prevent Hepatitis B: Vaccines, Tests & More

Vaccination is the single most effective way to prevent hepatitis B, offering protection that lasts at least 30 years when given in childhood. But prevention goes beyond the shot itself. Screening, safe practices, and post-exposure treatment all play a role in stopping this virus from spreading.

Why Prevention Matters

Hepatitis B is one of the most infectious bloodborne viruses. It can survive on surfaces like countertops, dried blood spots, and shared razors for at least seven days. A single needlestick exposure to infected blood carries a 6 to 30% chance of transmission, far higher than hepatitis C (1.8%) or HIV (0.3%). That high infectivity makes proactive prevention essential rather than optional.

Get Vaccinated

The hepatitis B vaccine is the cornerstone of prevention. It’s given as a series of shots, and completing the full series is what builds lasting immunity. For most adults, that means either a traditional three-dose schedule spread over six months or a newer two-dose option that can be completed in one month. Both are highly effective.

For infants, the first dose is typically given at birth, with additional doses in the following months. Studies show that people vaccinated before six months of age maintain immunity for at least 30 years, and likely much longer. Adults who were never vaccinated as children can start the series at any age.

If you’re unsure whether you were vaccinated or whether your immunity is still strong, a simple blood test can check for protective antibodies. This is especially worth doing if you work in healthcare, travel to regions where hepatitis B is common, or have other ongoing risk factors.

Get Screened

The CDC recommends that all adults aged 18 and older get screened for hepatitis B at least once in their lifetime using a triple panel blood test. This test checks three markers at once: whether you’re currently infected, whether you have immunity from a past infection or vaccination, and whether you’ve ever been exposed to the virus. It gives a complete picture in one draw.

Screening matters for prevention because many people carry the virus without knowing it. Someone who doesn’t know they’re infected can unknowingly pass it to sexual partners, household contacts, or, in the case of pregnant women, their newborns. Identifying carriers is how you break chains of transmission.

Certain groups need periodic testing rather than a one-time screen. This includes people who inject drugs, men who have sex with men, people on dialysis, household or sexual contacts of someone with hepatitis B, people born in regions where infection rates are 2% or higher, and anyone with HIV or hepatitis C. If you fall into any of these categories, regular testing should be part of your routine care. And the CDC is clear: anyone who requests testing should receive it, no questions asked, because many people are understandably reluctant to disclose risk factors.

Preventing Spread During Pregnancy

A pregnant woman with hepatitis B can pass the virus to her baby during birth, and infants infected this way face a very high risk of developing chronic, lifelong infection. Every pregnant woman should be screened for hepatitis B during each pregnancy, ideally in the first trimester, regardless of vaccination history or prior testing.

If the mother tests positive, her baby should receive both the hepatitis B vaccine and a dose of protective antibodies (called HBIG) within 12 hours of birth. This combination is highly effective at preventing transmission. When mothers have very high viral loads, above 200,000 IU/mL, antiviral medication during the third trimester can further reduce the risk. The goal is to lower the amount of virus in the mother’s blood before delivery.

Safe Practices That Reduce Risk

Because hepatitis B spreads through blood, sexual fluids, and from mother to child, everyday precautions make a real difference. Using condoms during sex significantly lowers the risk of sexual transmission. Avoid sharing razors, toothbrushes, nail clippers, or any personal item that could carry trace amounts of blood.

If you get tattoos or piercings, make sure the facility uses sterile, single-use needles and follows proper disinfection protocols. The virus is tough: it remains infectious on surfaces for at least a week, so proper sterilization isn’t just a formality.

For people who inject drugs, syringe services programs (sometimes called needle exchanges) play a proven role in reducing transmission. These programs are associated with roughly a 50% reduction in the spread of bloodborne infections, and research consistently shows they don’t increase drug use or crime. They also serve as a connection point for vaccination, testing, and treatment.

What to Do After a Possible Exposure

If you’ve been exposed to blood or body fluids from someone with hepatitis B, time-sensitive treatment can still prevent infection. The approach depends on the type of exposure.

  • Needlestick or blood splash to eyes or mouth: A dose of protective antibodies (HBIG) should be given as soon as possible, ideally within 24 hours. The vaccine series also starts within seven days, with follow-up doses at one month and six months.
  • Sexual exposure: HBIG is recommended within 14 days of the last sexual contact with an infected person, along with starting the vaccine series.
  • Newborns of infected mothers: Both HBIG and the first vaccine dose should be given within 12 hours of birth. The effectiveness of HBIG drops sharply if delayed beyond 48 hours.

If you’re already fully vaccinated with confirmed immunity, post-exposure treatment is generally not needed. This is one of the strongest arguments for getting vaccinated before any exposure happens: it eliminates the urgency and anxiety of the situation entirely.

Protecting Others if You’re a Carrier

If you’ve tested positive for hepatitis B, prevention shifts to protecting the people around you. All household members and sexual partners should be tested and vaccinated if they aren’t already immune. Cover any open cuts or wounds with bandages. Don’t share personal grooming items. And if you become pregnant, let your healthcare team know early so they can plan the right interventions for your baby at birth.

People born in regions with higher hepatitis B prevalence, including much of East Asia, sub-Saharan Africa, and the Pacific Islands, are more likely to have been infected in infancy without knowing it. If your parents were born in a region where the prevalence of hepatitis B surface antigen is 8% or higher, screening is especially important even if you were born in the United States.