Convert HTML to Markdown

Turn HTML into tidy Markdown for docs, notes and static sites. Tables become GitHub-style pipe tables, and the conversion runs locally.

Drop your file here, or browse

Images, documents, spreadsheets, data files and subtitles. Your file stays on your device.

Your file is converted on this device and is never uploaded to a server.

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

Main differences between the HTML and Markdown formats
FeatureHTMLMarkdown
Full nameHyperText Markup LanguageMarkdown
TypeMarkup document for the webLightweight markup in plain text
Introduced19912004
Created byTim Berners-Lee; maintained today by WHATWGJohn Gruber with Aaron Swartz; CommonMark spec since 2014
FormattingFull structure, links and media, styled with CSSHeadings, lists, links, emphasis, code and tables
PagesOne continuous page that reflowsNo page concept
Best forWeb pages and rich emailsREADMEs, documentation, notes and static sites
SupportEvery web browserGitHub, GitLab, note apps and static site generators
MIME typetext/htmltext/markdown

How to convert HTML to Markdown

  1. 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.

  2. Step 2: Drop it on the converter

    The file is parsed by your browser's own HTML parser.

  3. Step 3: Convert to Markdown

    Head content, scripts and styles are removed, and the body is converted element by element.

  4. 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 ![alt](src), 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.

Related conversions