TessaCodeTools

Free Markdown to HTML Converter

Write or paste Markdown and get clean, escaped HTML back instantly, with a live preview. Supports GitHub-flavored tables, fenced code, and task lists. Nothing is uploaded.

markdown79 words · 3 headings
outline: # ## ##
rendered
1506 chars

Tessacode Tools

Ten free developer tools that run entirely in your browser. No uploads, no sign-up, no waiting.

Shipping order

#ToolStatus
1Base64live
2UUIDlive
3JSONlive

This week

  • Base64 encoder
  • UUID generator
  • Markdown converter
    • GFM tables
    • task lists

Everything runs client-side, which is both a privacy feature and a cost feature.

Try it with Intl.DateTimeFormat, or read the project plan.

const html = markdownToHtml(source);

1 links · 1 code blocks

converted locally · html is escaped

Markdown, and which flavor you are writing

Markdown is a plain-text syntax that converts cleanly to HTML, designed so the source stays readable even before it is rendered. The catch is that there is no single Markdown. John Gruber's 2004 original left enough ambiguity that implementations diverged, which is why the same document can render three different ways in three different tools.

Two dialects matter in practice. CommonMark is the strict specification that settled the ambiguities. GitHub-Flavored Markdown builds on it and adds the features people actually reach for: tables, strikethrough, task lists, and automatic linking of bare URLs. This converter targets GFM, because that is what a README, a pull request description, and most documentation sites expect.

The syntax worth memorizing

Most of Markdown is obvious after one look. These are the parts that are not:

| Tool   | KD | Time |
|:-------|:--:|-----:|   <- colons set column alignment
| Base64 | 18 | 3h   |

- [x] a completed task
- [ ] an open one
  - [ ] indent two spaces to nest

Trailing two spaces force a line break.  
This line is part of the same paragraph.

```js
// language after the fence enables highlighting
```

The alignment colons in a table's delimiter row are the detail people look up most often. A colon on the left aligns left, on the right aligns right, on both centers the column.

Why the HTML output is escaped

Most converters pass raw HTML in the source straight through to the output. That is convenient and it is also how a Markdown document becomes a cross-site scripting vector: a<script>tag, anonerrorattribute, or ajavascript:link in a user-submitted comment executes on whatever page renders it.

This converter escapes every text node during conversion and can only emit a fixed allowlist of tags, so dangerous markup in the source arrives in the output as visible text. The trade-off is real and deliberate: you cannot drop a raw<div>into your Markdown and have it render. In exchange, output you paste into a page can never carry a payload.

Doing it in code

In JavaScript, the two standard choices aremarkedfor a single fast call and theremarkecosystem when you need to transform the document tree. In React, reach forreact-markdownwithremark-gfm, which renders to real components and skips thedangerouslySetInnerHTMLproblem entirely. Whatever you pick, if the Markdown comes from a user, run the output through a sanitizer such as DOMPurify before it reaches the DOM. A converter and a sanitizer are different jobs, and most converters do not do the second one.

Where Markdown quietly bites

Underscores inside words. A variable nameduser_id_valuecan turn half your sentence italic, because the underscores read as emphasis markers. Wrap identifiers in backticks and the problem disappears.

Lists that refuse to nest. Nesting depends on indentation, and different parsers disagree about how much is enough. Two spaces per level is the safest choice; tabs and four-space indents are where a nested list silently flattens or becomes a code block instead.

Missing blank lines. Markdown uses blank lines to separate blocks. A table, list, or heading pressed directly against the paragraph above it often gets absorbed into that paragraph. If something is not rendering, an absent blank line is the first thing to check.

Frequently asked questions

Which Markdown flavor does this support?+

GitHub-Flavored Markdown: headings, emphasis, strikethrough, fenced code blocks with language hints, tables with column alignment, task lists, blockquotes, images, and both inline and reference-style links.

Is the generated HTML safe to publish?+

Yes. Every piece of text is HTML-escaped during conversion and only a fixed allowlist of tags can be emitted, so raw script tags, event handler attributes, and javascript: URLs in the source come out as visible text rather than live markup.

Can I paste raw HTML into the Markdown?+

You can, but it will be escaped and displayed as text instead of rendered. That is a deliberate trade: it means converting an untrusted document can never inject anything into the page.

What does the line breaks option do?+

Standard Markdown treats a single newline inside a paragraph as a space, and only breaks the line when you end it with two spaces. GitHub comments break on every newline. Toggle the option to match whichever behaviour you need.

Is my document uploaded anywhere?+

No. Parsing happens entirely in your browser, so drafts, notes, and internal documentation never leave the tab.