html2text (turn HTML into equivalent Markdown-structured text) html2text is a Python script that converts a page of HTML into clean, easy-to-read plain ASCII text. Better yet, that ASCII also happens to be valid Markdown (a text-to-HTML format). html2text can be used as a standalone program ("html2text --help" for usage) or as a Python library (import html2text).