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.

Related tools

Base64 Encode / Decode
Encode and decode text and files to and from Base64.
HTML Live Preview
Write HTML, CSS, and JavaScript and see the result instantly.
JSON Formatter
Format, validate, minify, diff, and explore JSON — with optional on-device AI that summarizes any payload in plain English.
JWT Decoder
Inspect the header, payload, and expiry of any JSON Web Token — with optional on-device AI that explains what the token grants in plain English.
SQL Formatter
Beautify, format, and minify SQL queries for any dialect — with optional on-device AI that explains what a query does in plain English.
Unix Timestamp Converter
Convert Unix timestamps to dates and back, in any timezone.
Hash Generator
Generate MD5, SHA-1, SHA-256, and SHA-512 hashes in your browser.
JSON to TypeScript
Generate TypeScript interfaces or type aliases from JSON.
Markdown to PDF
Convert Markdown to a beautifully styled PDF in your browser.
QR Code Generator
Make QR codes for websites, Wi-Fi passwords, contact cards, social handles, email, SMS, and more. Download as PNG or SVG — or as a ZIP with one branded QR per social platform.
Password Generator
Generate strong, secure passwords in your browser. Nothing is sent or saved to any server.
Text Diff
Compare two pieces of text and see line-by-line, word-by-word, or character-by-character what changed.
UUID / ULID Generator
Generate UUID v4, UUID v7, or ULID identifiers in bulk, instantly in your browser.
SVG to PNG / JPEG / WebP
Convert SVG to PNG, JPEG, or WebP at any size — quality slider, transparent or colored background, copy to clipboard. Free, in your browser.
URL Encoder / Decoder
Encode or decode URLs and query parameters with component-vs-full-URI scope, plus a query-string breakdown. Free, in your browser.
Regex Tester
Test JavaScript regular expressions with live highlighting and a capture-group inspector — plus an AI regex generator that turns plain-English descriptions into regex (on-device Gemini Nano).
Color Converter
Convert colors between HEX, RGB, HSL, HSV, and OKLCH, and generate tint, shade, and harmony palettes. Free, in your browser.
Cron Builder
Build cron expressions visually or describe the schedule in plain English and let on-device AI write it for you. Plain-English explanation, next 5 runs, presets.