tooly

Convert Markdown to HTML online

Paste Markdown from GitHub, Obsidian or Notion and get standard HTML — with a live preview so you can check tables and code blocks before you copy.

Everything runs in your browser — nothing is sent anywhere

How to use

  1. 1

    Paste your Markdown into the box.

  2. 2

    Switch between the HTML source and the rendered preview.

  3. 3

    Copy the HTML or download it as a .html file.

Where the HTML ends up

Markdown is pleasant to write, but many destinations only accept HTML: a CMS editor's source view, an email template, a product description field in an online shop, a documentation portal without Markdown support, or a static page you are assembling by hand. Converting here gives you the markup to paste into any of them, and the preview lets you check the result before it goes live.

The conversion uses the GitHub Flavored Markdown dialect, so text written for a README, a pull request description or a notes app such as Obsidian behaves the same way here as it does there.

What the output looks like

The converter produces a body fragment: the elements themselves, with no <html>, <head> or styles. A few details are worth knowing before you paste it somewhere:

  • Headings have no id attributes. ## Pricing becomes <h2>Pricing</h2>. If you need anchor links for a table of contents, add the ids yourself.
  • Code blocks carry a language class. A fence opened with `python produces <pre><code class="language-python">, which highlighters such as Prism and highlight.js pick up automatically. Characters like < and & inside code are escaped.
  • Task lists become list items with disabled checkboxes, the same way GitHub renders them.
  • Tables become plain <table> markup with <thead> and <tbody>. Column alignment set with colons in the separator row is written as an align attribute.
  • No styling is included. The preview applies a light stylesheet so you can read it, but the copied HTML inherits whatever CSS the destination page has.

The download wraps the fragment in a minimal standalone page: a <!doctype html> document with <meta charset="utf-8"> and a <title> taken from the first heading, so accented letters and other non-ASCII text display correctly when the file is opened from disk. It adds no styles, so the page uses the browser defaults.

Line breaks and other surprises

Most confusion with Markdown comes from a handful of rules that differ from a word processor:

  • A single line break is not a new line. Two lines written one under the other join into one paragraph. Leave a blank line to start a new paragraph, or end a line with two spaces or a backslash to force a <br>. Some editors, including GitHub comments, treat single breaks as line breaks; this converter follows the standard behaviour used in GitHub README files and most static site generators.
  • Front matter is not recognised. A YAML block between --- lines at the top of a file is rendered as a horizontal rule followed by text, and the closing --- can turn the line above it into a heading. Remove the front matter before converting.
  • Footnotes, math and diagrams are not part of the dialect. $x^2$ stays literal text and a Mermaid block becomes a plain code block. Footnote syntax is worse than ignored: a definition like [^1]: note is read as a link reference, so the marker turns into a link pointing to the word note.
  • Quotes stay straight. Typographic quotes and dashes are not inserted; what you type is what you get.
  • A numbered list that does not start at 1 cannot begin directly under a paragraph. Lines like 3. three are absorbed into the paragraph text unless a blank line separates them. Bulleted lists and lists starting at 1 do not have this problem.

Raw HTML and safety

Markdown allows raw HTML, and this converter passes it through unchanged. A <details> block or a <span style> you wrote by hand will appear in the output exactly as written. That is useful, but it also means the output is not sanitised: a <script> tag or an onerror attribute in the source will be present in the copied HTML.

The preview itself runs in a sandboxed frame with scripts disabled, so viewing untrusted Markdown here is safe. Pasting the resulting HTML into your own site is a different matter. If the Markdown came from users or another untrusted source, run the HTML through a sanitiser on your side before publishing it.

Related conversions

To go the other way, from a web page or CMS export back to Markdown, use HTML to Markdown. For Word documents, DOCX to Markdown produces Markdown you can then preview and convert here. Everything runs in your browser as you type, so drafts and internal documentation are never sent to a server.

FAQ

Which Markdown flavour is supported?

GitHub Flavored Markdown: tables, task lists, strikethrough, fenced code blocks and autolinks, on top of CommonMark.

Is the HTML a full page?

The output shown and copied is the body fragment, ready to paste into a CMS or template. The download wraps it in a minimal HTML5 document with a UTF-8 charset and a title taken from the first heading.

Is my text uploaded?

No. Conversion and preview happen in your browser.

Can I convert HTML back to Markdown?

Yes, with the separate HTML to Markdown tool, which turns pasted HTML or a web page export back into clean Markdown.

Are scripts in the preview executed?

No. The preview is sandboxed; raw HTML in your Markdown is shown but cannot run scripts.

Related tools