The management of viral hepatitis in the setting of pregnancy requires special consideration. There are five liver-specific viruses (hepatitis A, B, C, D, E), each with unique epidemiology, tendency to chronicity, risk of liver complications and response to antiviral therapies. In the setting of pregnancy, the liver health of the mother, the influence of pregnancy on the clinical course of the viral infection and the effect of the virus or liver disease on the developing infant must be considered. Although all hepatitis viruses can harm the mother and the child, the greatest risk to maternal health and subsequently the fetus is seen with acute hepatitis A virus or hepatitis E virus infection during pregnancy. By contrast, the primary risks for hepatitis B virus (HBV), hepatitis C virus (HCV) and hepatitis D virus are related to the severity of the underlying liver disease in the mother and the risk of mother-to-child transmission (MTCT) for HBV and HCV. The prevention of MTCT is key to reducing the global burden of chronic viral hepatitis, and prevention strategies must take into consideration local health-care and socioeconomic challenges. This Review presents the epidemiology of acute and chronic viral hepatitis infection in pregnancy, the effect of pregnancy on the course of viral infection and, conversely, the influence of the viral infection on maternal and infant outcomes, including MTCT.