Every content migration hits the same wall. The old site, the CMS export or the saved email is HTML, and the new home wants Markdown: a Markdown-based CMS, a notes app, a README file, or an AI writing workflow that reads Markdown far better than markup. Retyping the content by hand is slow and introduces errors, and pasting raw HTML into a Markdown file leaves you with tags the new system may strip, mangle or display as literal text.
Conversion is the shortcut: paste the HTML in, get clean Markdown out. This guide explains what converts well, what gets simplified along the way, and how to do it with the free HTML to Markdown Converter on Ovatly, which is built on the Turndown library and runs entirely in your browser.
Contents
- Quick answer
- What converts cleanly
- What happens to images
- What gets simplified or dropped
- How to convert HTML to Markdown, step by step
- Worked example: a heading, emphasis and a link
- Limitations and honest tradeoffs
- Common mistakes
- FAQs
- Conclusion
- References
Quick answer
Open the HTML to Markdown Converter, paste your HTML into the box, either a full page or just a fragment, and read the Markdown that appears below it. Copy it, or download it as a .md file. Headings, emphasis, links, lists, code blocks and tables become their Markdown equivalents. Anything Markdown cannot express, such as complex table layouts, forms and styled divs, is simplified or dropped, keeping the text where possible. The converter does not fetch pages, so a URL on its own will not work: paste the HTML itself.
What converts cleanly
The structural core of HTML maps onto Markdown almost one to one. Headings become ATX headings in the # style, so an h2 arrives as a line starting with ##. Emphasis and strong text survive, links keep their text and destination, and lists become hyphen bullets or numbered lines. Code blocks come out as fenced code blocks, which keeps snippets readable and copyable in the new document. Simple tables, the kind with regular rows and columns, convert to Markdown pipe tables.
Knowing the output style before you start saves a surprise later. This converter uses ATX headings, fenced code blocks, hyphen bullets, and underscores for emphasis, so an italic phrase appears wrapped in single underscores rather than asterisks. If the system you are pasting into renders standard Markdown, all of that displays exactly as intended.
What happens to images
An img tag becomes Markdown image syntax with its source and alt text carried over, for example . That is a reference, not a copy. The converter does not download the image file, so after conversion the document still points at the original location. If you are migrating to a new host, the images need their own move: upload them to the new home and update the paths, or the converted pages will show broken image links even though the text arrived perfectly.
Alt text is worth checking at the same time. Whatever the original page used for alt is what lands in the Markdown, including empty alt text on images that deserved a description.
What gets simplified or dropped
Markdown is a smaller language than HTML, and the gap shows up in predictable places. Elements Markdown cannot express are simplified or dropped, keeping their text where possible. A styled div loses its styling and keeps its wording. Forms do not survive as forms. Tables built for layout, with merged cells or nested content inside them, cannot be represented as Markdown tables and are flattened to text.
Scripts and styles are not carried into the output at all, which is what you want: the Markdown holds the content, and the new system applies its own presentation. Treat conversion as moving the words and their structure, not the design. If a page's meaning depends on its layout, such as a pricing grid built from nested tables, expect to rebuild that piece by hand after the bulk of the text has converted.
How to convert HTML to Markdown, step by step
- Get the HTML. Copy the source of the page, the export from your old CMS, or just the fragment you actually need. A fragment converts cleaner than a full page, because navigation and footer markup never enters the result.
- Open the HTML to Markdown Converter and paste the HTML into the box.
- Read the Markdown that appears below it. Skim for the known weak spots: tables, images and anything that was heavily styled.
- Copy the Markdown, or download it as a .md file, and paste it into the new home.
- Fix image paths if the files are moving hosts, and rebuild by hand any layout piece that was flattened.
Worked example: a heading, emphasis and a link
Take a small fragment from a shop's story page:
<h2>Our story</h2>
<p>We make <em>small-batch</em> soap. Read <a href="/process">how it is made</a>.</p>
The converter returns:
## Our story
We make _small-batch_ soap. Read [how it is made](/process).
Each mapping is the standard one. The h2 heading becomes an ATX heading with two # characters. The em emphasis becomes underscores around the phrase. The link keeps its visible text and its destination, rewritten in Markdown's bracket and parenthesis form. Nothing about the wording changed; only the notation did, which is exactly what a format conversion should do.
Limitations and honest tradeoffs
The converter works on pasted HTML only. It cannot fetch a page from a URL, because it runs in your browser with no server behind it. That design is also its privacy story: the pasted HTML is parsed as text locally, nothing is uploaded, and no script inside the markup ever runs.
Fidelity has a ceiling set by Markdown itself, not by the tool. Merged table cells, multi-column layouts, interactive elements and inline styling have no Markdown equivalent, so no converter can carry them across intact. The honest expectation is a clean text-and-structure conversion in seconds, followed by a short manual pass on the pieces Markdown cannot hold. For a large archive, that is still hours saved compared with retyping.
Common mistakes
- Pasting a URL and expecting a conversion. The tool converts HTML text, not addresses. Copy the page source and paste that.
- Expecting a layout table to survive as a table. Merged and nested layout tables flatten to text. Rebuild those pieces deliberately.
- Assuming the images moved too. Only the image reference converts. The files stay where they were, and their paths may need updating.
- Expecting scripts and styles to carry over. They are dropped by design. The new system provides the presentation.
- Converting a whole page when a fragment would do. Headers, menus and footers become Markdown text too. Paste the content section and the result needs far less cleanup.
FAQs
Is the pasted HTML executed or uploaded? No. The HTML is parsed as text in your browser and converted locally. Nothing is uploaded to a server, and no script inside the pasted HTML runs, so it is safe to convert markup from pages you do not control.
What happens to images when I convert HTML to Markdown?
An image becomes Markdown image syntax carrying its source and alt text, for example
. The image file itself is not downloaded or copied, so the converted document still points at the original location and the file must exist there.
Can it convert a whole web page if I paste the URL? No. The converter works on HTML text only and does not fetch pages. Open the page, copy its source or the relevant section from your browser, and paste that HTML into the converter instead.
Why did my table lose its formatting? Simple tables convert to Markdown pipe tables. Tables used for layout, with merged cells or nested content, cannot be represented in Markdown, so they are flattened to plain text with the wording kept where possible.
What Markdown style does the output use? The output uses ATX headings in the # style, fenced code blocks, hyphen bullets for lists, and underscores for emphasis. Knowing the style up front helps if the place you are pasting into has its own Markdown conventions to match.
Conclusion
Converting HTML to Markdown is mostly about knowing what survives the trip: headings, emphasis, links, lists, code and simple tables arrive intact, while layout tricks and styling stay behind, by design. Paste your markup into the HTML to Markdown Converter, check the tables and image paths, and the content is ready for its new home. If the pages you are rebuilding also need their visual polish back, our guide to creating a CSS box shadow that looks natural covers one of the details that makes a rebuilt page feel finished. For more guides in this series, see our Website and Webmaster Tools guides.
References
- Turndown, the JavaScript library that converts HTML to Markdown: https://github.com/mixmark-io/turndown
- The Markdown Guide, on basic Markdown syntax: https://www.markdownguide.org/basic-syntax/