Try Pandoc!

Standalone
Fragment
Smart typography
Dumb typography
Links at end
Links inline
Table of contents
No table of contents

Pandoc

Pandoc is a program for converting between various markup formats. Input formats include markdown, reStructuredText, HTML, and LaTeX; output formats include HTML, LaTeX, ConTeXt, S5, DocBook, groff man, reStructuredText, markdown, and RTF. Many extensions to standard markdown syntax are provided, including inline LaTeX math, tables, definition lists, superscripts and subscripts, smart quotes and dashes, and footnotes. Pandoc is written in Haskell. To find out more about pandoc, visit the pandoc home page.