Free online HTML to Markdown converter. Paste HTML or upload an .html file, press Convert to Markdown, then copy GitHub Flavored Markdown or download a .md file.
Markup and Markdown work by OnlinePCApps since 2013
A block of HTML is heavy with tags a README, a wiki or a note cannot use. The free online HTML to Markdown converter strips it down to clean, portable Markdown.
A README, a GitHub wiki and a static site all speak Markdown, not HTML. Converting a page or a section moves the headings, links and code across as Markdown that renders cleanly wherever it lands.
A language model handles Markdown far better than raw HTML wrapped in scripts and styles. Converting first hands the model the words and the structure alone, which sharpens a summary or an answer.
An internal page or an unpublished draft should not pass through an outside server to be converted. Turndown runs in the browser, so the markup stays on the device while it becomes Markdown.
Paste HTML into the Source HTML editor, or select Upload to load an .html, .htm or .txt file. Drag and drop works too. A full page or one snippet both work, and the box starts with a sample heading and paragraph.
Press Convert to Markdown. The panel shows Converting... and then opens the result as Markdown Code, with an HTML Preview tab that renders the HTML that went in. The panel has no options to set.
Press Copy to copy the Markdown, or Download .md to save it. An uploaded file saves under its own name and pasted HTML saves as converted.md. Edit / Convert Another returns to the HTML.
To convert HTML is to map tags to Markdown marks. Here that means a Source HTML editor, a Convert to Markdown button and GFM output.
Every semantic tag becomes its Markdown equal, a heading to a hash, strong to a pair of stars, a link to bracket-and-parenthesis and an image to its own mark. The reader ends with clean text rather than a wall of tags.
A pre block with a code element becomes a fenced code block, and a class like language-js carries the language onto the fence. Inline code stays wrapped in backticks, so a snippet highlights the same as before.
The output is GitHub Flavored Markdown, so an HTML table becomes a pipe table, a strikethrough becomes a pair of tildes and a checkbox list becomes task items. The panel has no GFM switch, as the flavor is built in.
Scripts, inline styles and layout wrappers have no Markdown equal, so they are dropped rather than carried across as noise. What survives is the content and its structure, the part a README or a note needs.
To convert HTML to Markdown, to turn a page into an md file and to strip tags all name one task. A search for HTML to Markdown or HTML to md reaches this page, and the source markup stays as it was.
The HTML decides what the online HTML to Markdown converter returns. The results below run from clean to not on this page.
| The case | Result | What happens and why |
|---|---|---|
| Headings and text | 1:1 | An h1 to h6 becomes a hash heading, and bold or italic becomes stars or underscores. |
| Links and images | kept intact | A link keeps its text and href, and an image keeps its alt text and src. |
| Code blocks | fenced | A pre and code block becomes a fenced block, with the language from a class carried on. |
| Lists | nested | Ordered and unordered lists convert, and nesting is kept by indentation. |
| Tables | GFM | The output is GitHub Flavored Markdown, so a table becomes a pipe table. The panel has no GFM switch. |
| Strikethrough, tasks | GFM | Strikethrough and checkbox task lists use GFM syntax too. |
| Scripts and styles | dropped | Scripts, inline styles and layout wrappers have no Markdown equal and are removed. |
| No Markdown equal | kept as HTML | A tag Markdown cannot express can be left inline as raw HTML instead of lost. |
| Options | none | The panel has no heading, bullet or code style settings. Press Convert to Markdown and take the output as it comes. |
| Live update | not on this page | The Markdown appears after Convert to Markdown is pressed. Edit the HTML and press it again. |
| Web address | not on this page | The panel takes pasted HTML or a file, not a URL. Copy the page source or save it as an .html file first. |
| Several files | not on this page | Every run takes one pasted block or one uploaded file. |
| Preview | source only | HTML Preview renders the HTML that went in. The panel has no rendered view of the Markdown. |
| Source file | .html, .htm, .txt | Upload takes these three types. Save the file as UTF-8 first. For broken characters, see Character encoding explained and why text arrives broken. |
| Where it runs | on the device | The markup is converted in the browser, so nothing is uploaded. |
From HTML Tags to Markdown
HTML and Markdown describe the same content at two different levels of detail. HTML has more than a hundred element types and can express layout, color and behavior through tags, classes and styles. Markdown has around fifteen constructs and covers headings, emphasis, links, images, lists, blockquotes and code. A converter maps the semantic tags onto their Markdown equal, so an h2 becomes a hash heading, a strong becomes a pair of stars, a link keeps its text and address and a code block keeps its fence and language. This tool runs on Turndown, the most widely used library for the job at more than three million installs a week, which follows the CommonMark rules, with the GFM plugin adding tables, strikethrough and task lists. The honest point is that the mapping is lossy on purpose. A styled div, an inline color, a form or a script has no Markdown syntax, so it is dropped or left as inline HTML. The result favors a clean, portable file for a README, a wiki or a note over a pixel-perfect copy of the page, which is almost always the point of moving to Markdown. The references below define the formats.
Both convert HTML in one step. The trade is between a free paste-and-click page and a command line tool.
| Point of comparison | This tool This online converter On the device | pandoc A local command-line tool |
|---|---|---|
| Where the HTML goes | Stays on the device | Stays on the machine |
| Price and caps | Free with no sign-up | Free and open source |
| Many document formats | HTML to Markdown only | DOCX, LaTeX and dozens more |
| Choice of flavor | GFM output only | GFM, CommonMark and more |
| Script a build pipeline | A paste at a time here | One command in a script |
pandoc wins on many document formats, many files at once and scripted builds. On setup the free converter wins, with no install, no sign-up and no watermark. Online file tools and whether yours uploads goes deeper on that point.
The markup is parsed and rewritten inside the browser by Turndown, so the work is client-side and the HTML stays on the machine that opened it. No copy is passed to a server for the job.
HTML can hold an internal page, an unpublished draft or a client email never meant to sit on an outside server. A hosted converter has to upload the markup to process it, more exposure than a format change is worth.
All of these turn HTML into Markdown. They differ on effort, on cost and on setup.
pandoc needs a terminal, Turndown needs a project and a hand clean takes time. The online converter above takes pasted HTML or an .html file with no setup.
Three pointers lead to a tidier result from the online converter.
Markdown covers headings, links, lists, quotes, images and code. A styled layout, a color or a form has no Markdown syntax, so it is dropped or kept as inline HTML. The output is clean content rather than a copy of the page.
Plain Markdown has no table syntax, and no strikethrough or task lists. The output here is GitHub Flavored Markdown, so a table in the HTML comes out as a pipe table rather than raw tags. The panel has no switch for it.
The panel takes HTML that is pasted in or uploaded as a file. It does not fetch a live web address. Copy the page source, or save the page as an .html file first.
The online converter handles one input per run, which suits a quick paste. A folder of HTML files or an entire site moving to Markdown belongs on the desktop edition.
Point it at a folder of HTML files and every file is written to its own Markdown file in a single run, saved beside the source.
A book-length page or a long export is streamed from disk, past what a browser tab keeps in memory at once.
Saved presets set the GFM options and the heading and code style once, ready to apply across a repeated migration.
No sign-up and no cost. Paste HTML or upload an .html file into the online HTML to Markdown converter and copy or download clean Markdown.