BackgroundKlebsiella pneumoniaecapsular types K1, K2, K5, K20, K54, and K57 are prevalent hypervirulent types associated with community infections, and worrisomely, hypervirulent strains that acquired drug resistance have been found. In the search for alternative therapeutics, studies have been conducted on phages that infectK. pneumoniaeK1, K2, K5, and K57-type strains and their phage-encoded depolymerases. However, phages targetingK. pneumoniaeK20-type strains and capsule depolymerases capable of digesting K20-type capsules have rarely been reported. In this study, we characterized a phage that can infectK. pneumoniaeK20-type strains, phage vB_KpnM‐20.MethodsA phage was isolated from sewage water in Taipei, Taiwan, its genome was analyzed, and its predicted capsule depolymerases were expressed and purified. The host specificity and capsule-digesting activity of the capsule depolymerases were determined. The therapeutic effect of the depolymerase targetingK. pneumoniaeK20-type strains was analyzed in a mouse infection model.ResultsThe isolatedKlebsiellaphage, vB_KpnM‐20, infectsK. pneumoniaeK7, K20, and K27-type strains. Three capsule depolymerases, K7dep, K20dep, and K27dep, encoded by the phage were specific to K7, K20, and K27-type capsules, respectively. K20dep also recognizedEscherichia coliK30-type capsule, which is highly similar toK. pneumoniaeK20-type. The survival ofK. pneumoniaeK20-type-infected mice was increased following administration of K20dep.ConclusionsThe potential of capsule depolymerase K20dep for the treatment ofK. pneumoniaeinfections was revealed using an in vivo infection model. In addition, K7dep, K20dep, and K27dep capsule depolymerases could be used forK. pneumoniaecapsular typing.Supplementary InformationThe online version contains supplementary material available at 10.1186/s12929-023-00928-0.