Objectives: Although cirrhosisis a major cause of liver-related mortality globally, validation studies of the administrative coding for diagnoses associated with cirrhosis are scarce. We aimed to determine the validity of the International Classification of Diseases, 10th revision (ICD-10) codes corresponding to cirrhosis and its complications in the Swedish National Patient Register (NPR). Methods: We randomly selected 750 patients with ICD codes for either alcohol-related cirrhosis (K70.3), unspecified cirrhosis (K74.6) oesophageal varices (I85.0/I85.9), hepatocellular carcinoma (HCC, C22.0) or ascites (R18.9) registered in the NPR from 72 healthcare centres in 2000-2016. Hospitalisation events and outpatient visits in specialised care were included. Positive predictive values (PPVs) were calculated using the information in the patient charts as the gold standard. Results: Complete data were obtained for 630 (of 750) patients (84%). For alcohol-related cirrhosis, 126/136 cases were correctly coded, corresponding to a PPV of 93% (95% confidence interval, 95%CI: 87-96). The PPV for cirrhosis with unspecified aetiology was 91% (121/133, 95%CI: 85-95) and 96% for oesophageal varices (118/123, 95%CI: 91-99). The PPV was lower for HCC, 84% (91/109, 95%CI: 75-90). The PPV for liver-related ascites was low, 43% (56/129, 95%CI: 35-52), as this category often consisted of non-hepatic ascites. When combining the ascites code with a code for chronic liver disease, the PPV for liver-related ascites increased to 93% (50/54, 95%CI: 82-98). Conclusions: The validity of ICD-10 codes for cirrhosis, oesophageal varices and HCC is high. However, coding for ascites should be combined with a code of chronic liver disease to have an acceptable validity.