The present results suggested that the AST/ALT level is negatively associated with BMDs, and the AST/ALT level is associated with an increased risk of osteopenia/osteoporosis in T2DM. Here, GPT is linked to osteoporosis.