Requests

Laboratory tests

Hepatitis B vaccine and immunity

The hepatitis B vaccine was one of the first vaccines able to prevent an infection that can lead to cirrhosis and liver cancer.

Clínica Alegre practitioner pipetting a sample into a test tube beside sample collection tubes

Reviewed by Dr. Fernando Alegre

Clinical Director · OMD, registration no. 9688

Written by the Clínica Alegre team10-minute read

In this article

In Portugal, it is part of the National Vaccination Programme and is given at birth, so most children and young people are protected from their first months of life. Many adults, however, were born before universal vaccination, do not know whether they were vaccinated or wonder whether protection lasts over the years.

This article explains how the vaccine works, the recommended schedule, who should confirm immunity with tests, what failure to respond means and why most people do not need boosters. Tests measuring protection, particularly anti-HBs, are explained here from the vaccination perspective; detailed interpretation of all markers is covered in another article in this series.

How the vaccine works

The vaccine contains only a laboratory-produced surface protein from the virus. It contains neither live virus nor material capable of causing infection. On encountering this protein, the immune system learns to recognise it and produces anti-HBs antibodies and memory cells. If the person later encounters the real virus, the body responds quickly and prevents infection from becoming established.

Because the vaccine contains only the surface protein, it does not cause anti-HBc, a marker of contact with the virus, to appear in tests. This allows the doctor to distinguish someone protected by vaccination from someone previously infected. This is useful, for example, when deciding whether someone needs vaccination or is already protected by a past infection.

SituationHBsAgAnti-HBcAnti-HBs
Vaccinated with a good responseNegativeNegativePositive
Past infection, resolvedNegativePositiveUsually positive
Never vaccinated or infectedNegativeNegativeNegative
Current infectionPositivePositiveUsually negative

The schedule in Portugal

Under the National Vaccination Programme, the first dose is given to newborns soon after birth. The second and third doses are given at 2 and 6 months in a combined vaccine that also protects against other diseases. This schedule provides very early protection and reduces the risk of childhood infection, when infection is most likely to become chronic.

For unvaccinated adults who need the vaccine, the doctor sets the schedule, usually three doses spread over several months. If interrupted, the course generally does not need restarting: the missing doses are completed. The vaccination record is the best evidence of what was given; anyone without it can ask their health centre to check their record.

AgeHepatitis B vaccine (National Vaccination Programme)
Birth1st dose
2 months2nd dose (combined vaccine)
6 months3rd dose (combined vaccine)

Babies born to mothers with hepatitis B

When a pregnancy test shows that the mother is HBsAg-positive, the baby receives the first vaccine dose plus hepatitis B-specific immunoglobulin, ideally in the first hours of life. This greatly reduces the risk of infection. For mothers with high levels of virus in their blood, guidelines also allow antiviral treatment in the final trimester, as decided by the medical team.

After completing the course, these babies usually have tests to confirm that they are protected and uninfected (HBsAg and anti-HBs). The paediatrician or GP decides the exact timing. If the baby has not responded, vaccination may need to be repeated.

Who should confirm immunity with tests

Measuring anti-HBs is not recommended for most vaccinated people. The vaccine is highly effective and routine testing offers no benefit. The position differs for groups with greater exposure to the virus or a weaker vaccine response. Here, anti-HBs is usually measured one to two months after the last dose, when the response can be assessed most accurately.

The World Health Organization and European guidelines also stress testing and vaccinating household members and sexual partners of people with hepatitis B. These contacts are first tested for infection and immunity and offered vaccination if they have neither.

GroupWhy measuring anti-HBs may be useful
Healthcare professionals and studentsExposure to blood and needlestick injuries
People on dialysis or with chronic kidney diseaseVaccine response is often weaker
People with HIV or reduced immunityWeaker response and increased risk
Sexual partners and household members of someone with hepatitis BOngoing exposure
Babies born to mothers with hepatitis BConfirm protection and absence of infection

When the vaccine does not “take”

A small proportion of people do not produce enough anti-HBs after a complete course. This is more common with increasing age, obesity, smoking, diabetes, chronic kidney disease and reduced immunity. Before concluding that someone has not responded, the doctor checks for viral infection, because someone who is HBsAg-positive will not have anti-HBs either.

Once infection has been ruled out, the usual approach is to repeat a vaccination course and measure anti-HBs again. Anyone who still does not respond is considered a non-responder. They should know their status because after a high-risk exposure, such as a needlestick injury, they may need specific immunoglobulin. Evidence on the best strategy for non-responders remains limited and options vary; decisions are always individualised.

Result after complete vaccinationUsual next step, to be decided by the doctor
Anti-HBs above the laboratory thresholdConsidered an adequate response
Anti-HBs below the thresholdTest for infection (HBsAg, anti-HBc)
No infection and no responseRepeat the course and measure again
No response after a second courseConsider a non-responder and plan post-exposure protection

Antibody levels fall: what next?

Anti-HBs levels fall over the years and become undetectable in many people vaccinated in childhood. A “negative” result years later understandably causes concern. However, in people with a normal immune system who responded to vaccination, immune memory enables a rapid response to the virus. Guidelines therefore do not recommend routine boosters for the general population.

There are exceptions. In people on dialysis or with reduced immunity, protection depends more on antibody levels, and the doctor may recommend periodic measurements and boosters. Healthcare professionals with a documented response usually remain protected, though individual institutions may require specific assessments. If you do not know whether you responded, speak to the doctor before arranging tests yourself.

Adult vaccination: who should consider it

Many Portuguese adults were born before vaccination at birth and were never vaccinated. For most, the risk of encountering the virus is low, but vaccination is recommended for healthcare and other workers exposed to blood; people living with someone with hepatitis B; sexual partners of infected people; people with multiple sexual partners; people who use or have used injected drugs; people on dialysis or with chronic liver disease; and travellers to or residents of regions where infection is common.

In these cases, the GP assesses the indication, may request tests before vaccination and prescribes the appropriate schedule. You do not need a special reason to raise the subject: asking the doctor whether you are protected is itself a good reason for an appointment.

Vaccine safety

The hepatitis B vaccine has been used in millions of people for decades and has a very favourable safety profile. The most common side effects are pain, redness or swelling at the injection site and sometimes mild fever or tiredness for one or two days. Severe allergic reactions are very rare; anyone who has had one after a previous dose or a vaccine component should tell the healthcare professional.

The vaccine can be given during pregnancy and breastfeeding when indicated because it contains no live virus. It can also be given to people with chronic conditions, who are often among those who benefit most. Discuss safety concerns with the doctor or nursing team giving the vaccine.

After a high-risk exposure

A needlestick injury, unprotected sex with someone with hepatitis B or another exposure to blood warrants prompt medical assessment, ideally within the first hours. The healthcare professional assesses the vaccination status of the exposed person and, where possible, the source, then decides whether vaccine, immunoglobulin or both are needed. A vaccination record and, for healthcare professionals, an anti-HBs record greatly speed this decision.

If you do not know where to go, SNS 24 (808 24 24 24) can advise you. If the exposure occurred during an assault or involved serious injuries, call 112.

At Clínica Alegre in Setúbal and Seixal, you can have laboratory tests and ask our team any questions about the results.

Frequently asked questions

I was vaccinated as a child. Am I protected?

In the vast majority of cases, yes, even if antibodies are no longer detectable. The doctor decides whether assessment is needed.

Do I need a booster?

For the general population with a normal immune system, guidelines do not recommend routine boosters. There are exceptions, such as dialysis.

I do not know whether I was vaccinated. What should I do?

Check your vaccination record or the record at your health centre. If no record exists, the doctor may request tests or offer vaccination.

Can the vaccine cause hepatitis B?

No. The vaccine contains no live virus.

Can I be vaccinated if I have had hepatitis B?

If tests show a resolved past infection or current infection, vaccination offers no benefit. A doctor may therefore request tests before vaccinating adults at risk.

I am pregnant. Can I be vaccinated?

Yes, when indicated, because the vaccine contains no live virus. Speak to the professional overseeing your pregnancy.

Did you enjoy this article?

Scientific references3
  1. Direção-Geral da Saúde. Programa Nacional de Vacinação 2020. Norma n.º 018/2020, de 27/09/2020. Lisboa: Direção-Geral da Saúde; 2020.
  2. European Association for the Study of the Liver. EASL 2017 Clinical Practice Guidelines on the management of hepatitis B virus infection. J Hepatol. 2017;67(2):370–98.
  3. World Health Organization. Guidelines on preventing, diagnosing, caring for and treating people with chronic hepatitis B infection. Geneva: World Health Organization; 2024.
Article information
Written by
Clínica Alegre team
Clinical review
Dr Fernando Alegre, Clinical Director · OMD, registration no. 9688
Published
2 Dec 2026
Last updated
2 Dec 2026
Topic
Laboratory tests
Reading time
10 min

See also

Related treatments

Want to know what is right for you?

Contact us on WhatsApp or book an assessment, in person or online.

Book an appointment

Book your assessment.

Choose Setúbal or Seixal. We reply within opening hours.

Newsletter

Get the latest news from the Clínica Alegre.

Blog articles and clinic news, delivered to your inbox. Unsubscribe at any time.