Free, private and 100% offline
HTML to Markdown Converter
Convert HTML to clean Markdown in your browser. Paste HTML source, paste content copied straight from a web page, or open a saved .html or .mhtml file, and get GitHub Flavored Markdown with tables, task lists and fenced code. Menus, ads and scripts are stripped first, and nothing leaves your device.
Tip: copy part of any web page and paste it into the HTML pane. The formatting comes with it.
Markdown style and base URL
Images are shown as placeholders so the preview never loads anything from another site.
1,650 HTML chars to 511 Markdown chars, 69% smallerAbout 413 to 128 tokens89 wordsConverted: <main>
What is an HTML to Markdown converter?
An HTML to Markdown converter turns web markup such as <h2>, <a href> and <table> into the plain-text Markdown syntax used by GitHub, Obsidian, static site generators and AI chat tools. A heading becomes ## Heading, a link becomes [text](url) and a table becomes rows separated by pipes. The result is shorter, easy to edit by hand and easy to track in Git.
This converter is built on Turndown, the open-source JavaScript library behind many HTML to Markdown tools, with extra rules on top: it finds the main article, removes page clutter, writes GFM tables with column alignment, keeps code block languages, turns relative links into full URLs and can add YAML front matter. All of it runs in this browser tab.
How to convert HTML to Markdown
- 1
Add your HTML
Paste HTML source into the HTML pane, choose Open file for an .html, .htm or .mhtml file, or drop the file on the editor. You can also copy part of any web page and paste it: the formatted HTML on your clipboard is used, not the plain text.
- 2
Choose what to keep
Main content only and Remove menus, ads and forms are on by default. Pick inline, reference or plain-text links, decide what happens to images, and switch GitHub Flavored Markdown or YAML front matter on or off.
- 3
Check the result
The Markdown updates as you type. Switch to Preview to see it rendered, and read the status bar for the size and token savings.
- 4
Copy or save
Choose Copy Markdown to paste it into a README, a note or an AI prompt, or Download .md to save a file named after the one you opened.
Features that make the Markdown cleaner
- Paste straight from a web page
- Select text on any site, copy it and paste. The converter reads the HTML your browser puts on the clipboard, so headings, bold text, links, lists and tables survive. One click switches back to plain text.
- Open saved pages
- Open .html, .htm, .xhtml and single-file .mhtml pages saved by Chrome or Edge. Older pages saved in Windows-1252 or another character set are decoded correctly.
- Main content only
- When the page has a <main> element or a single <article>, only that part is converted, so the site header, menu and footer never reach your Markdown.
- Clutter removal
- Scripts, styles, iframes and SVG icons are always dropped. With clean-up on, navigation, forms, buttons, cookie banners, share bars, sidebars and hidden text go too.
- GitHub Flavored Markdown
- Tables become pipe tables with :---: alignment, <del> becomes ~~strikethrough~~ and checkbox lists become - [x] task lists. Turn GFM off for strict CommonMark.
- Links and images your way
- Use inline links, numbered reference links collected at the end, or plain text. Keep images, keep only their alt text, or remove them. Lazy-loaded images use their real source.
- Absolute URLs
- Relative links such as /docs/setup are resolved against the page's <base>, canonical URL or og:url, or a base URL you type, so they still work outside the original site.
- Front matter for static sites
- Add a YAML block with the title, description, URL, author and publish date read from the page head, ready for Hugo, Jekyll, Astro or Obsidian.
HTML to Markdown for ChatGPT, Claude and other LLMs
Markdown is the format AI chat tools read and write most naturally, and it carries the same structure as HTML in far fewer characters. The sample page in this tool is 1,650 characters of HTML and 511 characters of Markdown after conversion, 69% smaller, because tags, attributes, scripts and menus are gone while the headings, lists, table and links stay.
Fewer characters means fewer tokens in your prompt and more room in the context window for your actual question. The status bar estimates tokens at about 4 characters per token, a common rule of thumb for English text. For an exact count per model, paste the Markdown into the LLM Token Counter linked below.
Before you paste a page into a prompt, keep Main content only and Remove menus, ads and forms switched on, and set Images to Alt text only so the model learns what each image showed without long image URLs.
How HTML elements convert to Markdown
Every common HTML element has a Markdown equivalent. This is what the converter writes with the default settings.
| HTML | Markdown output | Notes |
|---|---|---|
| <h1> to <h6> | # to ###### | Underlined (setext) style available for h1 and h2 |
| <strong>, <b> | **bold** | Or __bold__ |
| <em>, <i> | *italic* | Or _italic_ |
| <a href> | [text](url) | Inline, reference or plain text; relative URLs resolved |
| <img> |  | Or alt text only, or removed |
| <ul>, <ol> | - item and 1. item | Nested lists indented; the start number of <ol> is kept |
| Checkbox inside <li> | - [x] done | GFM task list |
| <del>, <s> | ~~text~~ | GFM strikethrough |
| <table> | | a | b | | GFM pipe table; merged cells stay as HTML |
| <pre><code class="language-js"> | ```js fenced block | Language read from common class names |
| <code>, <kbd> | `code` | Inline code |
| <blockquote> | > quote | Nested quotes keep their depth |
| <hr> | --- | Thematic break |
| <dl> | **Term** then the definition | Markdown has no definition list |
| <script>, <style>, <iframe> | Removed | Never copied into the output |
GitHub Flavored Markdown or plain CommonMark?
GitHub Flavored Markdown (GFM) is CommonMark plus tables, strikethrough, task lists and autolinks. GitHub, GitLab, Obsidian, VS Code and most static site generators read it, so it is on by default. Turn it off when the Markdown goes to a strict CommonMark parser.
| Element | GFM on | GFM off |
|---|---|---|
| Table | Pipe table with column alignment | Clean HTML <table>, which CommonMark allows |
| Strikethrough | ~~text~~ | Plain text |
| Checkbox list | - [x] item | - item |
| Merged cells (colspan, rowspan) | Clean HTML <table> | Clean HTML <table> |
Convert a whole web page or saved .html file
To convert a page you are reading, the quickest route is to select the part you want, copy it and paste it into the converter. For the full page, press Ctrl + S (Cmd + S on a Mac), save it as Webpage, HTML Only or Webpage, Single File (.mhtml), then choose Open file. Saved pages usually keep their canonical URL, which the converter uses to turn relative links into full ones.
If you only want one block of a page, open your browser's developer tools, right-click the article or main element, choose Copy, then Copy outerHTML, and paste that.
Why is there no URL box? Browsers do not let one site read another site's HTML unless that site allows it, so URL converters fetch pages on their own servers. Saving or copying the page keeps the whole job on your device, and it also works for pages behind a login.
Common uses for HTML to Markdown
- Moving a WordPress, Ghost or other CMS blog to Hugo, Jekyll, Astro or Next.js, with front matter for each post.
- Turning HTML documentation or a help center article into a README.md or a docs folder in Git.
- Clipping articles and research into Obsidian, Logseq or another Markdown notes app.
- Preparing web pages, documentation or knowledge base articles as compact context for ChatGPT, Claude, Gemini or a RAG pipeline.
- Copying a table from a web page into a GitHub issue, pull request or wiki.
- Converting HTML exported from Google Docs (File, Download, Web page) or an email newsletter into editable text.
Benefits of converting HTML to Markdown here
- Private by design
- Your HTML is converted inside this tab and never sent to a server, so intranet pages, internal wiki articles and unpublished drafts are safe to paste.
- No account, no quota
- There is no sign-up, daily limit or watermark. Files up to 25 MB open directly from your device.
- Honest output
- Complex tables stay as clean HTML instead of being flattened into wrong rows, and the status bar says what was removed and which part of the page was converted.
- Works on any device
- It runs in any modern browser on Windows, Mac, Linux, ChromeOS, iPhone and Android, with nothing to install.
What Markdown can't keep
Markdown describes structure, not design. Colors, fonts, CSS layout, columns, forms, embedded video and scripts have no Markdown equivalent and are dropped. Tables with merged cells are kept as HTML, which GitHub and most renderers still display. Pages that build their content with JavaScript may save without it, so copy from the page as you see it instead. Review long or unusual pages before you publish the result.
Other ways to convert HTML to Markdown
For batch jobs and scripts, a command-line tool or library is the better fit. These are the common choices.
| Option | How | Best for |
|---|---|---|
| This converter | Paste or open a file in the browser | Single pages, content pasted from websites, private documents |
| Pandoc | pandoc -f html -t gfm page.html -o page.md | Batch scripts and converting between many formats |
| Turndown (JavaScript) | new TurndownService().turndown(html) | Node.js and browser apps |
| markdownify or html2text (Python) | markdownify(html) or html2text.html2text(html) | Python scrapers and data pipelines |
| Microsoft MarkItDown | markitdown page.html > page.md | Preparing many documents for LLMs |
HTML to Markdown converter FAQ
How do I convert HTML to Markdown?
Paste HTML into the HTML pane or choose Open file to load an .html file. The Markdown appears next to it as you type. Choose Copy Markdown or Download .md to use it. No account is needed and nothing is uploaded.
Can I paste content copied from a web page instead of HTML code?
Yes. Select part of any page, copy it and paste it into the HTML pane. Your browser puts a formatted HTML version on the clipboard and the converter uses it, so headings, links, bold text, lists and tables carry over. Choose Paste as plain text instead if you only wanted the words.
Can I convert a web page to Markdown from its URL?
Not by URL. Browsers block one site from reading another site's pages, and fetching through a server would mean your page leaves your device. Save the page with Ctrl + S as HTML or .mhtml and open the file, or copy the part you need and paste it.
Does it support GitHub Flavored Markdown tables, strikethrough and task lists?
Yes, GFM is on by default. HTML tables become pipe tables with column alignment, del and s tags become ~~strikethrough~~, and checkbox lists become - [ ] and - [x] task lists. Tables with merged cells stay as clean HTML, because GFM tables cannot merge cells.
How do I remove menus, ads and scripts before converting?
Leave Main content only and Remove menus, ads and forms switched on. Scripts, styles and iframes are always removed. The first option converts only the main element or single article, and the second drops navigation, page headers and footers, sidebars, forms, cookie banners, share buttons and hidden text.
Is my HTML uploaded or stored anywhere?
No. Conversion runs in your browser tab and your HTML is never sent to a server or saved. The preview shows images as placeholders, so even remote images in your HTML are not requested.
How much smaller is Markdown than HTML for an AI prompt?
It depends on the page, but the saving is usually large. The sample in this tool drops from 1,650 to 511 characters, 69% less. Full web pages often shrink more, because menus, scripts and attributes make up most of their HTML. The status bar shows the before and after size and a token estimate for your own page.