DEV Community

At Use
At Use

Posted on • Originally published at at-use.com

HTML to Markdown Converter - server-side PHP, handles tables and nested lists

The problem

Most HTML-to-Markdown converters run in the browser via Turndown.js or similar. That works until you hit a 400KB CMS export or a table-heavy HTML file - then the browser starts struggling, and the library drops edge cases silently.

What we built

HTML to Markdown Converter runs server-side via PHP DOMDocument. The conversion happens on the server, nothing is stored, nothing is logged.

Options

  • Header style: ATX (# Heading) or Setext (===== underline)
  • List bullet: dash, asterisk, or plus
  • Strip HTML comments before conversion (default: on)

What it handles

Headings (h1-h6), ordered and unordered lists, nested lists, bold and italic, links with title attributes, images with alt text, inline code, fenced code blocks (language hint preserved from class="language-*"), blockquotes, tables (pipe syntax), and horizontal rules.

Round-trip cluster

This is the third tool in the cluster:

Free, no signup. Feedback welcome.

Top comments (0)