Santekno/tools

Markdown ↔ HTML

Convert Markdown to sanitized HTML, or HTML back to clean Markdown. Bidirectional, GFM-aware.

Processed in your browserUpdated · Jan 2026
Input
0 chars
Output
0 chars

How to use Markdown ↔ HTML

Paste your input on the left, choose the options you want, and the output appears instantly on the right. Everything runs in your browser — none of your data is sent to a server.

  • Paste or type your input in the INPUT panel
  • The output regenerates automatically as you type
  • Use Copy to put the result in your clipboard
  • Click Sample to load a working example

What is Markdown ↔ HTML?

Markdown ↔ HTML is a bidirectional converter using `marked` for MD→HTML (with GitHub-flavored Markdown extensions: tables, strikethrough, autolinks) and `turndown` for HTML→MD. MD→HTML output is sanitized with DOMPurify to remove script tags, event handlers, and other XSS vectors before display. Both directions run entirely in the browser; nothing is uploaded. This tool is part of santekno's developer toolbox — a curated collection of utilities built for engineers who care about speed, privacy, and simplicity.

Common use cases

  • Debugging API payloads and integration issues
  • Inspecting tokens, hashes, or encoded strings during development
  • Generating fixtures and sample data for tests
  • Sharing readable output with teammates in code reviews

FAQ

Yes. Output is passed through DOMPurify which removes scripts, event handlers, and other XSS vectors before display.

CommonMark + GitHub-flavored extensions (GFM): tables, strikethrough, task lists, autolinks, fenced code blocks.

Common elements (headings, lists, links, code) round-trip cleanly. Inline styles, custom classes, and complex tables may simplify.

Yes, but expect minor formatting normalization (e.g., heading style atx → atx, list markers normalized to `-`).

Yes, in the HTML output. Standard `<img>` and `<a>` tags pass through DOMPurify. URLs are not auto-fetched.