If you need to convert files from one markup format into another, pandoc is your swiss-army knife. Pandoc can convert almost all formats
https://pandoc.org/index.html