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.