Converting HTML to Markdown using Markdownify

  • 26th Dec 2023
  • 1 min read
  • • 
  • Tags: 
  • markdown

I had some HTML content that I wanted to convert to markdown.

The simplest tool I found to do this effectively was a python utility called Markdownify.

I used Nix Shell to install it:

nix-shell -p python311Packages.markdownify

And to do the conversion I just did:

markdownify myfile.html > myfile.md

where myfile.html is the name of the file I wanted to convert and myfile.md in the name of the markdown file it got converted to.