The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,949 other followers

A few HTML to Markdown converters written in javascript, Python, Ruby, PHP and C#

Posted by jpluimers on 2014/07/24

It’s not perfect, but makes the conversion a heck of a lot easier:

to-markdown – an HTML to Markdown converter written in javascript (of which sources are on github).

[Edit 20150919: added more converters: now at least there is competition (:]

Not perfect either: (click on the Demo button at the bottom of the page to test), but it can be ran from the console as well (there is an npm package for it): is a pure JavaScript library for converting HTML in to valid Markdown (sources are on github as well).

A JavaScript version without a browser demo, but with another npm package is html2markdown:

html2markdown – Javascript Implementation for converting HTML to Markdown text.

Then there is this Python script and module aaronsw/html2text:

html2text – Convert HTML to Markdown-formatted text.

Pandoc – though supporting many conversion formats – is not as good from html to markdown as the others: Try pandoc!

For people using Ruby, there are  the gems reverse_markdown and html2markdown:

reverse_markdown – Ruby gem to convert html into markdown.

html2markdown – simple and flexible html to markdown converter.

In C#, there is a library with tests, but without a console front-end baynezy/Html2Markdown:

Html2Markdown – A library for converting HTML to markdown syntax in C#.

Finally I found something for PHP lovers: html-to-markdown:

html-to-markdown – Convert HTML to Markdown with PHP

I don’t have time to test them all now, so I go with the first two for now until I run in trouble (they both run in the browser which is very convenient), then test the others until I’ve the least trouble.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: