Pandoc

Pandoc is a command line tool for converting document formats.1 It supports converting to and from a huge range of formats.