Documentation usually migrates for a plain reason: the old home is a CMS or help center nobody wants to maintain, and the new home is a folder of text files that can live in a repo, be searched, diffed and rebuilt by a static site generator. The temptation is to treat the move as one bulk job. It works far better as a loop you repeat: one page, converted and checked, then the next.
The HTML to Markdown Converter on Ovatly does the translation, turning pasted HTML into Markdown with the Turndown library. Your part of the job is selection and verification: feeding it the right fragment for each page, and running a short checklist before you call that page done. This guide lays out the loop, the checklist, and the losses to expect and accept on purpose.
Contents
- Quick answer
- What the converter does to each element
- Convert the fragment, not the page
- How to migrate a page, step by step
- The per-page checklist
- Worked example: one documentation page, converted and checked
- Limitations and honest tradeoffs
- Common mistakes
- FAQs
- Conclusion
- References
Quick answer
Migrate one page at a time. Copy the page's content fragment, not the whole page, paste it into the HTML to Markdown Converter, and convert. Then run the per-page checklist: headings in order, code samples fenced, simple tables intact with every row, images copied across separately, and relative links rewritten for the new home. Accept up front that styled callouts and layout tables flatten. That is the price of plain-text documentation, and it is cheaper paid openly than discovered after launch.
What the converter does to each element
Knowing the mapping in advance tells you what to check afterwards. Headings become ATX headings, the style with # characters in front. Emphasis comes out with underscores, links become [text](url), and lists become hyphen bullets. Code blocks come out as fenced code blocks. A simple data table becomes a pipe table. An image becomes image syntax with its source path and alt text, for example .
Two categories do not come across at all. Scripts and styles are not carried into the output, which is what you want. And elements Markdown cannot express, such as forms, styled div layouts and complex table layouts, are simplified or dropped, keeping their text where possible. Nothing is uploaded during any of this: the HTML is parsed as text in your browser, and no script inside it runs.
Convert the fragment, not the page
The single biggest time saver in a documentation migration is choosing what to paste. A full HTML page includes the navigation, sidebar, breadcrumbs and footer, and all of that is ordinary markup, so all of it converts. You would spend longer deleting converted menu links than the conversion saved you.
Instead, take only the content fragment: the article or documentation body, without the site chrome around it. View the page source or use your browser's developer tools to copy the relevant section. Scripts and styles inside the fragment are dropped automatically, so what you paste can be rough; it is the visible structure that matters.
How to migrate a page, step by step
- Open the old page, view its source, and copy the content fragment: the documentation body only.
- Paste the fragment into the HTML to Markdown Converter and convert. Copy the Markdown, or download it as a .md file.
- Save the file in the new documentation tree under the page's new name.
- Run the per-page checklist below, fixing what it catches while the original page is still open beside you.
- Copy the page's image files into the new home and make sure every image path in the Markdown resolves to a real file.
- Mark the page done on your migration list, note any deliberate losses, and move to the next page.
The per-page checklist
- Headings. One top-level heading per page, levels in order, all in ATX style.
- Code. Every sample sits inside a fenced code block, with no raw markup leaked into the text around it.
- Tables. Simple tables are present as pipe tables with all their rows. Layout tables are flagged for manual rebuilding, not silently flattened.
- Images. Every image reference has a real file at the path it names in the new home.
- Links. Relative URLs are rewritten for the new folder structure or replaced with absolute URLs.
- Losses logged. Callouts, styled boxes and forms that were simplified are noted on the migration list, so nobody later mistakes the flattening for an accident.
Worked example: one documentation page, converted and checked
Take a small documentation fragment with one heading, one link, one image and one simple table:
<h2>Our story</h2>
<p>We make <em>small-batch</em> soap. Read <a href="/process">how it is made</a>.</p>
<p><img src="/photo.jpg" alt="Bars of soap curing on a rack"></p>
<table>
<tr><th>Bar</th><th>Cure time</th></tr>
<tr><td>Lavender</td><td>4 weeks</td></tr>
<tr><td>Charcoal</td><td>4 weeks</td></tr>
</table>
The converted Markdown:
## Our story
We make _small-batch_ soap. Read [how it is made](/process).

| Bar | Cure time |
| --- | --- |
| Lavender | 4 weeks |
| Charcoal | 4 weeks |
Now the checklist. Headings: one heading, converted to ATX, good. Code: none on this page, nothing to fence. Tables: the pipe table kept all three rows, header plus two bars, good. Images: the syntax is right, but photo.jpg itself was not downloaded, so the file gets copied into the docs assets before this page counts as done. Links: [how it is made](/process) kept its URL, but /process was a path on the old site, so it is rewritten to the process page's new location. One page, five checks, a few minutes: that rhythm, repeated, is the whole migration.
Limitations and honest tradeoffs
Markdown is a smaller language than HTML, and a migration is partly a decision about what to leave behind. Styled callouts lose their boxes and colors. Tables used for layout flatten into plain text. Forms disappear. The converter keeps the text of these elements where it can, but it cannot keep their presentation, because the destination format has nowhere to put it.
The converter also moves text, not assets or addresses. Image files travel separately, and relative links keep pointing at the old site's structure until you rewrite them. And because the tool works entirely in your browser on HTML you paste, it cannot fetch pages from URLs or crawl the old site for you. Page by page is not a workaround for a missing bulk feature; it is the method that keeps the checking honest.
Common mistakes
- Pasting whole pages. The navigation and footer convert along with the content, and the cleanup takes longer than the conversion saved.
- Treating conversion as the whole migration. The .md file is one of three things that move. Image files and link targets are the other two, and both are manual.
- Converting everything before checking anything. Migrate one page, perfect the checklist on it, then repeat. A flaw in your routine caught on page one is cheap; caught on page ninety, it is a second migration.
- Losing track of the losses. If a flattened callout is not written down, someone will file it as a bug later. Log each deliberate loss as you go.
FAQs
Should I paste the whole page or just the article body? Just the content fragment. Navigation, sidebars and footers convert into Markdown too, and you would spend longer deleting them than the conversion saves. Scripts and styles are dropped automatically, but ordinary markup such as menus becomes text and links in the output.
What happens to images during the migration? Each image becomes Markdown image syntax carrying its source path and alt text. The image file itself is not downloaded, so images are a separate migration step: copy the files across and make sure each path in the Markdown points at a real file.
Will my tables survive the move? Simple data tables become pipe tables with their rows and cells intact. Tables used for layout are flattened into plain text, because Markdown has no layout table syntax. Pages built around layout tables need manual rebuilding after conversion.
What happens to code samples in the docs? Code blocks come out as fenced code blocks, and headings, emphasis, links and lists map to their Markdown equivalents. Check each converted page anyway: a quick read against the checklist catches the few places where the original HTML did something Markdown cannot express.
Is my documentation uploaded anywhere during conversion? No. The HTML is parsed as text inside your browser and no script in it runs. Nothing is uploaded, which also means the tool cannot fetch a page from a URL: you paste the HTML yourself.
Conclusion
A documentation migration is a loop, not an event: fragment, convert, check, move the files, log the losses, next page. The HTML to Markdown Converter makes the middle step fast, and the checklist keeps it truthful. If the part that breaks on your pages is the links, our guide to HTML to Markdown conversion mistakes that mangle links goes through the four usual causes and their fixes. More guides in this series live in our Website and Webmaster Tools guides.
References
- Turndown, the library the converter uses to turn HTML into Markdown: https://github.com/mixmark-io/turndown
- CommonMark specification, the reference for Markdown syntax: https://spec.commonmark.org/
- Markdown, the original project page by John Gruber: https://daringfireball.net/projects/markdown/