Loading Techie Utils…

Markdown to HTML Converter

Convert Markdown to HTML you can paste somewhere, with the rendered page beside it. Free, and runs entirely in your browser — nothing is uploaded.

About Markdown to HTML

Markdown in, HTML out, with the rendered page beside the markup so you can see that it came out right before pasting it anywhere. It reads CommonMark's common ground and the GitHub extensions people actually write: pipe tables with alignment, task lists, strikethrough, fenced code with a language class.

Two switches decide what shape the result takes. A fragment is what goes into a template or a CMS field; a whole page adds a doctype, a title taken from the first heading and a small stylesheet, which is what you want when the answer is a file somebody will open. Heading ids are on by default, because a document without them cannot have a table of contents or be linked into.

HTML in the source is escaped rather than passed through, which is the one place this differs from a general-purpose converter. Every library does pass it through — that is what the format says to do — and the result is only safe if you sanitise it afterwards. Escaping on the way in makes the dangerous case impossible to express instead, and the tool reports every block it escaped and every link address it dropped, with line numbers, so nothing changes quietly.

Everything runs in this tab. Documentation, internal notes and unreleased copy are not uploaded to be converted.

Where it helps

  • Shows the markup and the rendered page together, so the output is checked before it is used.
  • Reads GitHub's pipe tables with per-column alignment, task lists, strikethrough and fenced code.
  • Writes a fragment to paste or a complete page to open, from the same source.
  • Gives headings stable ids, so a contents list and #section links work.
  • Escapes HTML and drops unsafe link schemes, and says exactly what it did and on which line.
  • Offers the result as a file, and never uploads the source to produce it.

Limits

  • Raw HTML is escaped rather than passed through, so a document that relies on embedded markup will not convert faithfully.
  • Reference-style links, footnotes and definition lists are not supported.
  • No syntax highlighting is applied; a fenced block gets its language as a class for a highlighter to use later.
  • The whole-page stylesheet is deliberately plain, and is meant to be replaced rather than used as a theme.
  • It stops at four megabytes of input.

Frequently asked questions

Why is my HTML escaped instead of rendered?

Because the preview is drawn into the page you are on. Passing markup through would mean the document could bring script with it, so it is escaped and reported instead. The note under the result lists the lines.

Do I still need to sanitise the output?

Not for what this produced, since no markup from the source survives and unsafe link schemes are dropped. Sanitise anyway if you later mix in HTML from somewhere else.

What is the difference between a fragment and a whole page?

A fragment is the body markup on its own, for pasting into a template. A whole page wraps it in a doctype, a title taken from the first heading, and a small stylesheet, so it opens in a browser and looks like something.

How are heading ids generated?

Lowercased, punctuation removed, spaces turned into hyphens — GitHub's spelling — and a number appended when two headings would otherwise collide.

Why did my table come out as a paragraph?

A row of pipes is only a table when the line under the header is a delimiter row of dashes and colons with the same number of cells. Check that row first, and check the pipe-table switch is not turned off.

Related tools

  • Markdown Viewer — Read a Markdown file the way it is meant to look, with its contents beside it
  • Markdown to PDF — Set Markdown as it renders: headings, emphasis, lists, code, quotes and tables
  • HTML Formatter — Indent and tidy HTML markup
  • HTML Entities — Escape and unescape HTML entities
  • Case Converter — Switch between sentence, camel, snake and other cases
  • Word Counter — Count words, characters, sentences and reading time

More Text Tools tools

  • Markdown Viewer — Read a Markdown file the way it is meant to look, with its contents beside it
  • Case Converter — Switch between sentence, camel, snake and other cases
  • Word Counter — Count words, characters, sentences and reading time
  • Text Comparison — Line-by-line diff of two blocks of text
  • Duplicate Remover — Remove, isolate or list duplicate lines
  • Whitespace Remover — Trim, collapse and normalise whitespace
  • Sort Lines — Sort lines alphabetically, naturally, by number or length, reverse them, or shuffle them