HTML is what browsers eat. Markdown is what you want in a repo. If you need to edit web content, store it in Git, or publish it through a static site generator, converting HTML to Markdown is a solid move.

I think of HTML → Markdown like pruning a plant. You’re trimming away layout junk so the actual content can grow cleanly: headings, paragraphs, lists, links, and code you can maintain.

TL;DR

  • Open TinyUtils Document Converter
  • Upload your HTML file
  • Select Markdown output
  • Download clean .md file
  • Headings, links, and lists usually come through cleanly

Why convert HTML to Markdown?

  • Git-friendly — Track changes with version control
  • Static sites — Hugo, Jekyll, Astro, Docusaurus
  • Documentation — Docs-as-code workflows
  • Editing — Markdown is easier to read and write
  • Portability — Plain text never becomes obsolete

When not to convert

Convert to Markdown when you want clean, portable text. Keep HTML when the exact styling matters. A few examples where HTML is the better “source of truth”:

  • Marketing pages: layout, spacing, and CSS classes matter
  • Component-heavy pages: lots of non-semantic wrappers (div soup)
  • Pages that rely on custom CSS: Markdown can’t carry those styles without extra tooling

What converts

  • <h1> to <h6> — Become # through ######
  • <p> — Paragraphs preserved
  • <a> — Links become [text](url)
  • <strong>/<b> — Bold becomes **text**
  • <em>/<i> — Italic becomes *text*
  • <ul>/<ol> — Lists become - and 1.
  • <table> — Tables become | pipe | syntax |
  • <pre><code> — Code blocks become ```
  • <blockquote> — Becomes > quote
  • <img> — Becomes ![alt](src)

What's stripped

  • <script> — JavaScript removed
  • <style> — CSS removed
  • Classes/IDs — HTML attributes dropped
  • Comments — HTML comments removed
  • Metadata — <head> content ignored

How to convert

  1. Go to TinyUtils Document Converter
  2. Upload your .html file (or paste HTML)
  3. Choose Markdown from output options
  4. Click Convert
  5. Download the .md file

Clean HTML = clean Markdown

The converter does its best, but messy HTML produces messy Markdown. For best results:

  • Use semantic HTML (headings, not styled divs)
  • Remove inline styles before converting
  • Simplify nested structures

One practical tip: if you’re converting a live webpage, try to start with the content, not the whole page chrome. Navigation menus, cookie banners, and “related posts” widgets all turn into junk Markdown. If you can, grab the article HTML (or use Reader Mode and copy the main content) before you convert.

For a “save it right the first time” workflow:

  1. Open the page.
  2. Use Reader Mode (or print view) to isolate the article.
  3. Save that HTML or copy the content.
  4. Convert the simplified HTML to Markdown.

This avoids spending your life deleting cookie banners from a Markdown file.

Images

<img src="photo.jpg" alt="My photo"> becomes ![My photo](photo.jpg)

Image files aren't downloaded, just referenced. Make sure paths still work in your destination.

HTML pages often rely on a “base URL” that’s implicit in the site structure. Once you convert to a standalone Markdown file, relative links can break because the file moved. A quick check:

  • If you see links like ../about/ or /docs/intro/, confirm they still resolve where you’re publishing the Markdown.
  • If you’re moving content into a docs site, you may need to rewrite links to the new structure.

If you’re migrating a lot of pages, do link rewriting as a separate step. Convert first, then do a focused pass: update internal links, update image paths, and run a quick spot-check on the top few pages. It’s faster than trying to fix everything mid-conversion.

Tables

HTML tables become Markdown tables:

| Header 1 | Header 2 |
|----------|----------|
| Cell 1   | Cell 2   |

Complex tables with colspan/rowspan are simplified. Manual cleanup may be needed.

If a table is genuinely complex (merged headers, multi-row grouping), consider keeping it as HTML inside your Markdown. Many Markdown renderers allow raw HTML blocks, and it can be more readable than a broken pipe table.

Markdown flavor

Output aims for a GitHub‑flavored style of Markdown (GFM‑ish):

  • Fenced code blocks with ```
  • Tables with pipes
  • Strikethrough with ~~text~~
  • Some converters also emit task lists (- [ ]) when they can

Frontmatter (optional, but useful)

If you’re moving content into a docs site or blog, add YAML frontmatter so your site generator has metadata to work with. A minimal example:

---
title: "My Article Title"
date: 2026-01-28
---

This keeps titles consistent, makes routing easier, and gives you a clean place to store tags or a description later. If your project doesn’t use frontmatter, skip it — Markdown works fine without it.

Quick cleanup checklist

Even with good HTML, you’ll usually want a quick pass before you commit it to a docs site or a repo:

  • Headings: confirm the hierarchy makes sense (one H1, then H2s, etc.).
  • Line breaks: remove “one sentence per line” wrapping if it happened.
  • Links: check relative URLs (they often need a new base path after moving files).
  • Tables: if a table is wide, consider keeping it as HTML or splitting it.
  • Code blocks: make sure code is fenced and not accidentally wrapped into paragraphs.

Aim for “clean enough that the next person can edit it without hating you.”

Mini playbook: migrating a blog post

If you’re moving posts between platforms (old CMS → new CMS, WordPress → static site, etc.), here’s a workflow that stays sane:

  1. Convert HTML → Markdown and commit it early (so you can diff your changes).
  2. Fix images: download them, store them in your repo, and update links to relative paths.
  3. Check headings: migrations love to turn every section into H1s. Undo that.
  4. Kill junk: newsletter embeds, “related posts” blocks, and tracking snippets don’t belong in Markdown.
  5. Render once: preview the post in the new site and spot-check links and code blocks.

Do it once like this and you’ll stop feeling like you’re moving furniture in the dark.

Batch conversion

Upload multiple HTML files. Download a ZIP of Markdown files.

FAQ

What about WordPress exports?

If you have HTML from WordPress, this works. The converter handles the common WordPress HTML patterns.

Can I convert an entire website?

Currently, upload individual HTML files. For bulk site conversion, save each page locally first.

What about <div> soup?

Pure layout divs are stripped. If your content is buried in divs with no semantic meaning, the output may need cleanup.

Next steps

Ready to convert your HTML to Markdown? Open TinyUtils Document Converter, upload your file, and get clean Markdown.

Then skim it once.