Converts D-glucuronic acid residues adjacent to N-sulfate sugar residues to L-iduronic acid residues, both in maturing heparan sulfate (HS) and heparin chains. This is important for further modifications that determine the specificity of interactions between these glycosaminoglycans and proteins. [heparosan-N-sulfate](n) = [heparan-N-sulfate](n) Glycan metabolism; heparan sulfate biosynthesis. Glycan metabolism; heparin biosynthesis. Homodimer (PubMed:30872481). Interacts with HS2ST1. Belongs to the D-glucuronyl C5-epimerase family.