Hepatitis B is a viral infection that causes inflammation of the liver. The hepatitis B virus (HBV) spreads through blood and certain body fluids, including semen and vaginal fluids — often through unprotected sex, shared needles, needlestick injuries, or from a mother to her baby during birth.
Hepatitis B testing is a group of blood tests that look for different pieces of evidence: proteins from the virus itself (antigens), the antibodies your immune system makes in response, and the virus's genetic material. Depending on which markers are present, a doctor can tell whether you have a current infection, a past infection you have recovered from, or immunity from vaccination.
Hepatitis B testing is different from a liver function test (LFT) panel. LFTs measure how the liver itself is doing and can show that something is irritating or injuring liver cells, but they cannot say what caused it. Hepatitis B testing looks specifically for evidence of HBV, which is what confirms hepatitis B as the cause.