Why convert HTML to Markdown
HTML is verbose and hard to edit by hand, while Markdown reads almost like plain text. Moving content into Markdown makes it easy to keep in Git, edit in note apps such as Obsidian, or publish with static site generators like Hugo, Jekyll, Astro and Docusaurus.
This converter uses Turndown, a mature HTML to Markdown library, with sensible settings: # style headings, fenced code blocks, dash bullets and asterisk emphasis. It also converts tables to GitHub-flavored pipe tables and strips scripts, styles and embedded frames, so you get content rather than page plumbing.
HTML vs Markdown at a glance
| Feature | HTML | Markdown |
|---|---|---|
| Full name | HyperText Markup Language | Markdown |
| Type | Markup document for the web | Lightweight markup in plain text |
| Introduced | 1991 | 2004 |
| Created by | Tim Berners-Lee; maintained today by WHATWG | John Gruber with Aaron Swartz; CommonMark spec since 2014 |
| Formatting | Full structure, links and media, styled with CSS | Headings, lists, links, emphasis, code and tables |
| Pages | One continuous page that reflows | No page concept |
| Best for | Web pages and rich emails | READMEs, documentation, notes and static sites |
| Support | Every web browser | GitHub, GitLab, note apps and static site generators |
| MIME type | text/html | text/markdown |
How to convert HTML to Markdown
Step 1: Get the HTML file
Save a web page as .html, export an email or CMS post, or save a snippet into a .html file.
Step 2: Drop it on the converter
The file is parsed by your browser's own HTML parser.
Step 3: Convert to Markdown
Head content, scripts and styles are removed, and the body is converted element by element.
Step 4: Download the .md file
Open it in your editor or commit it to your repository.
What gets converted
Structure
Headings, paragraphs, lists, block quotes and horizontal rules.
Inline formatting
Bold, italics, inline code, links, images and strikethrough.
Code blocks
pre and code elements become fenced code blocks.
Tables
HTML tables become GitHub-flavored pipe tables.
Popular HTML to Markdown jobs
Migrating a blog. Move posts from WordPress or another CMS to a Markdown-based site.
Saving articles to notes. Keep readable copies of web pages in Obsidian or Logseq.
Writing documentation. Convert legacy HTML help pages into docs-as-code.
Preparing text for AI tools. Markdown keeps structure while cutting HTML noise.
What is removed or simplified
Markdown has no concept of layout, colors or classes, so styling is dropped. Scripts, style sheets, noscript blocks, templates, iframes and everything in the head section are removed entirely. Navigation menus and footers that are part of the body will still appear, so for web pages you may want to trim those afterwards.
Complex tables with merged cells cannot be represented in pipe tables. Their content is kept, cell by cell, but the merged layout is flattened.
Links and images
Links are written as [text](url) and images as , using the URLs exactly as they appear in the HTML. Relative URLs such as /images/photo.jpg stay relative, so they only work if the Markdown lives in a site with the same structure.
Characters that have meaning in Markdown, such as asterisks and underscores in normal text, are escaped with backslashes so the document renders as the original read.
- Absolute URLs work anywhere.
- Relative URLs need the same folder structure.
- Alt text is preserved for accessibility.
Tips for clean Markdown
- Save only the article part of a page when you can; browser reader mode helps.
- Run a find and replace for leftover navigation text after converting full pages.
- Check tables with merged cells and rebuild them by hand if needed.
- Use HTML to TXT instead if you only want the words without any markup.
HTML to Markdown questions
Which Markdown style is produced?
ATX headings (#), fenced code blocks, dash bullet lists, asterisk emphasis and GitHub-style pipe tables.
Are CSS styles kept?
No. Markdown cannot express styling, so classes, inline styles and style sheets are removed.
Does it handle tables?
Yes, simple tables become pipe tables. Merged cells are flattened.
What about JavaScript in the page?
Script tags are removed and never executed.
Can I convert a live URL?
Not directly. Save the page as an .html file in your browser first, then convert the file.
Is the HTML uploaded?
No. Parsing and conversion run in your browser.