Markdown to HTML: what each syntax becomes
Type Markdown and learn which HTML each piece turns into: # Heading becomes <h1>, **bold** becomes <strong>, and a fenced code block becomes <pre><code>. The live preview shows the rendered result, and Copy HTML gives you the markup. All conversion runs in your browser using the marked library.
Preview renders in a sandboxed iframe. No scripts execute, and raw HTML is reduced to basic formatting: links show their address on hover and only embedded (data:) images display. Converted with marked in a background worker, which stops after 2 seconds.
How it works
The tool uses marked, a fast, CommonMark-compliant Markdown parser, running in a background Web Worker in your browser. As you type, marked converts the Markdown syntax to HTML which is rendered in a live preview pane. A conversion that takes longer than 2 seconds is stopped and a message shown instead.
Processing runs in your browser
All parsing and rendering happens locally in your browser tab. Our servers are not involved at any point.
Related operations
For escaping reserved HTML characters in your Markdown, try HTML entities. To count the words you have drafted, use the word counter. For bulk edits to recurring phrases, see find and replace.
Frequently asked questions
- How does Markdown convert to HTML?
- Markdown syntax maps directly to HTML elements: # becomes <h1>, **bold** becomes <strong>, *italic* becomes <em>, [text](url) becomes <a href>, and so on.
- What HTML does a fenced code block produce?
- A fence opened with ```js becomes <pre><code class="language-js">, and <, > and & inside the block are escaped. The class carries the language hint for a syntax highlighter; the tool adds no colours itself.
- What HTML does a table produce?
- A <table> with a <thead> row of <th> cells and a <tbody> of <td> cells. Alignment colons in the divider row (:--, :-:, --:) become align="left", "center" or "right" on each cell.
- How do task lists and line breaks convert?
- - [x] done becomes a list item that starts with <input checked="" disabled="" type="checkbox">. A single line break inside a paragraph stays a newline, which the browser shows as a space; end the line with two spaces or a backslash to get <br>.
Last reviewed September 30, 2026
Other pages for this tool
Related tools
- Background reading: Complete guide to developer tools