HTML and Markdown, both directions, in one place
Two formats that engineers shuffle between every day. Markdown for READMEs, docs, GitHub issues, chat. HTML for actual web pages, email templates, anything a browser renders. The translation between them is tedious by hand and dangerous with regex, block elements nest, inline tags overlap, code fences eat backticks. This tool runs the conversion through real parsers on the server: `turndown` for HTML to Markdown, `marked` for Markdown to HTML.
Paste your content on the left, watch the converted output appear on the right with a live preview of the rendered result. Toggle GitHub Flavored Markdown (tables, fenced code, strikethrough), keep or strip raw HTML when going to Markdown, switch on smart quotes for clean typography.
Everything runs server-side which is a deliberate choice: a real DOM and a real markdown lexer beat browser-side regex every time, and the output is sanitized before it leaves the route, so the preview never gets to host a stray `<script>` tag.
How to use it
- Pick a direction at the top: HTML to Markdown for porting a blog post into a README, or Markdown to HTML for getting an email body out of a docs file.
- Paste your source into the input box on the left, or click Load sample to see a working example with a table and a code block.
- The output box updates after a short pause (about 350 ms), long enough to coalesce keystrokes, short enough to feel live.
- Use the GitHub Flavored Markdown switch to enable tables, fenced code blocks and task lists. Leave it on for almost every modern use case.
- Turn on Preserve raw HTML when going HTML to Markdown if your source uses tags Markdown cannot express (e.g. `<kbd>`, `<sup>`, `<details>`), they stay verbatim instead of being dropped.
- Smart quotes swaps straight quotes for curly ones and three dots for a real ellipsis. Toggle off when your output is going to a code editor that hates Unicode.
- Click Swap direction to round-trip: the current output becomes the new input and the direction flips. Useful to check that no data was lost.
- Click Copy to grab the output to clipboard, or Paste to bring in HTML or Markdown directly from your clipboard without leaving the page.
When this is useful
Six concrete situations where this saves real time:
- Importing a blog post into a README. You wrote a long-form article in your CMS (output is HTML), you want it as Markdown in the repo. Paste, pick HTML to Markdown, copy. Tables and code blocks survive the trip.
- Sending a docs page as an email. You have a Markdown file in your repo, your transactional email service wants HTML. Convert once, paste the HTML body into the template.
- Cleaning up rich-text paste. Word, Notion and Google Docs all paste bloated HTML with inline styles, span wrappers and class soup. Paste it here, pick HTML to Markdown, get a clean string with just the structure, headings, lists, links, code.
- Migrating a CMS. Old site exports HTML, new site (Hugo, Astro, Next.js content collection) reads Markdown. Bulk convert page by page, keep the structure, ditch the inline styles.
- Composing GitHub issues with tables. You drafted a comparison table in HTML somewhere, you want it as a proper GFM table in an issue. Paste, convert, paste into GitHub. The pipe-character mess is generated for you.
- Sanity-checking your Markdown rendering. You wrote a long README and want to see how it will look on GitHub. Paste into Markdown to HTML, watch the live preview. If a code fence breaks or a table is misaligned, the preview tells you immediately. To assemble the README itself, jump to the README builder; for table-only work the Markdown table editor is faster; and for long docs grab a Markdown TOC.