snaptxt.app

HTML ↔ Markdown Converter

Convert HTML to Markdown or Markdown to HTML, with a live preview. GFM tables, fenced code blocks, and inline formatting all supported. Free, in your browser.

HTML
Markdown

Your content stays on your device.

HTML → Markdown uses Turndown; Markdown → HTML uses marked with GFM. Both run entirely in your browser — nothing is uploaded.

How to use it

  1. 1Pick a direction — HTML → Markdown or Markdown → HTML.
  2. 2Paste your input on the left. The converted result appears on the right and updates as you type.
  3. 3For Markdown → HTML, a rendered preview shows below so you can sanity-check the visual output.
  4. 4Hit Swap to move the result back into the input and flip the direction — useful for round-trip checks.

Common use cases

  • Lift a styled email or web article into a clean Markdown draft for your CMS or notes app.
  • Convert a Markdown README to HTML for embedding in a static site or email template.
  • Sanity-check that a Markdown snippet renders the way you expect before publishing.
  • Migrate content between platforms with different markup conventions (e.g. Notion HTML → Obsidian Markdown).
  • Strip the noise out of "copy as HTML" exports and keep only the structure that Markdown captures.

Frequently asked questions

Which Markdown flavor is supported?
Markdown → HTML uses marked with GitHub Flavored Markdown enabled — tables, task lists, autolinks, fenced code blocks. HTML → Markdown uses Turndown with sensible defaults (ATX headings, fenced code, hyphen bullets). The two directions don't always round-trip identically because HTML can express things Markdown can't — that's a property of the formats, not a bug.
Does it preserve code blocks and language hints?
Yes. <pre><code class="language-js">...</code></pre> becomes a fenced ```js block, and the reverse is also true.
Is the rendered HTML preview sanitized?
No — the preview shows the HTML you produce as-is. Since the conversion is single-user and nothing is persisted to a server, there's no XSS risk to anyone but you. Don't paste untrusted HTML if you wouldn't already trust the source.
Is my content uploaded?
No. Both Turndown and marked run entirely in your browser. The libraries are loaded on demand (one direction at a time) and your content never leaves the page.
Why are some HTML elements lost in the Markdown output?
Markdown has no equivalent for things like <details>, custom data-attributes, inline styles, or arbitrary divs. Turndown either keeps such content as raw HTML inside the Markdown (most safe behavior) or drops it if it's purely decorative. If you need everything preserved, stay in HTML.