HTML to Markdown converter

Paste HTML or drop .html files and get clean Markdown back, with headings, links, lists, tables and code kept and the scripts, styles and tags stripped out. Copy it or download a .md file. Get your documents ready for AI. Free, in your browser, nothing uploaded.

or paste HTML

Converted in your browser, never uploaded. Snippets and full HTML pages both work.

How it works

  1. 1

    Paste HTML or drop files

    Paste a snippet or a whole page's source, or drop up to twenty .html or .htm files at once, each up to 10MB.

  2. 2

    Your browser converts it

    Scripts, styles and comments are dropped. Headings, paragraphs, links, lists, tables, code blocks and images become their Markdown equivalents.

  3. 3

    Copy or download the .md

    Preview the Markdown, copy it to your clipboard, or save a .md file for each HTML file. Nothing is uploaded or stored.

What the converter keeps and drops

HTML mixes content with everything needed to display it: class names, inline styles, scripts, tracking tags and comments. Markdown keeps only the content and its basic structure. This converter removes scripts, styles and comments, then turns each remaining element into its plain-text Markdown form, so a heading stays a heading, a table stays a table and a link keeps its address.

What's left is ordinary Markdown that opens in any text editor, Obsidian, Notion, GitHub or a docs site, and pastes cleanly into a chat.

Things to check after converting

Markdown has no layout, so columns, colors and positioning are left out. Tables with merged cells, nested tables or no header row don't fit Markdown's simple grid and may need tidying by hand. Embedded videos, forms and buttons have no Markdown form. On a full web page, navigation and footer text comes through along with the article, so skim the top and bottom of the result and trim what you don't want.

Related free tools

For documents that start as PDFs, use PDF to Markdown. The token counter tells you whether the Markdown fits a model's context window, and the text splitter breaks a long result into parts. If you'd rather have one file cleaned and chunked into text for an AI tool, try the free knowledge base builder.

Frequently asked questions

How do I convert HTML to Markdown?
Paste the HTML into the box on this page and the Markdown appears below it as you type. To convert saved pages, drop the .html files instead. Each result has a Copy button and a Download .md button. There is nothing to install and no account.
Which HTML elements are converted?
Headings become # to ######, paragraphs are separated by blank lines, links become [text](url), images become ![alt](src), bold and italic become ** and *, and ordered and unordered lists become 1. and - items. Tables with a header row become GitHub-style Markdown tables (tables without one are kept as HTML), strikethrough becomes ~~text~~, <pre> blocks become fenced code blocks, and <br> becomes a line break. Script, style, noscript and template tags and HTML comments are removed.
Can I convert a whole web page?
Yes. Save the page from your browser (File, then Save Page As, choosing HTML only) and drop the .html file here, or open View Page Source and paste it in. If the page is a full document, only the <body> is converted. Menus, sidebars and footers in the page are part of the body, so they are converted too; delete any you don't need from the Markdown.
Is my HTML uploaded anywhere?
No. The conversion runs inside your browser tab and the .md file is created on your device. The page loads the converter code the first time you use it, but your HTML is never sent to our servers or anyone else's.
Why convert HTML to Markdown for ChatGPT or Claude?
Markdown keeps the parts of a page that carry meaning, such as headings, lists, links and tables, without the tags, attributes and scripts around them. The result is usually much shorter than the HTML, so more of your content fits in a message or a knowledge file. Check its size with the token counter before you paste it in.
What happens to relative links and images?
Links and image paths are copied exactly as they appear in the HTML. A relative link such as /pricing stays relative, so if the Markdown will live somewhere else, replace those with full URLs. Images are written as Markdown image links pointing at the original source; the image files themselves are not downloaded.

Need a whole folder turned into clean knowledge files for ChatGPT or Claude? KBP packs from $9 once.

More free tools

Token Counter

Count tokens for ChatGPT and OpenAI models exactly, with a Claude estimate. Paste text or drop a PDF, Word, Markdown, CSV, HTML or text file. Runs in your browser.

PDF Word Counter

Count words in one or more PDF documents, with characters, pages, reading time and exact OpenAI tokens. Flags scanned PDFs. Runs in your browser.

PDF to Markdown Converter

Convert PDFs to clean Markdown with headings, lists and paragraphs rebuilt, and running headers and page numbers removed. Runs in your browser.

Text Splitter

Split long text into chunks by tokens, words or characters, with optional overlap and part labels for ChatGPT or Claude. Breaks at paragraphs and sentences. Runs in your browser.

Remove Line Breaks

Remove line breaks from text copied from PDFs and emails. Keep paragraphs, join everything into one line or use your own separator, and re-join hyphenated words. Runs in your browser.

EPUB to TXT Converter

Convert EPUB ebooks to plain text in your browser. Chapters stay in reading order; nothing is uploaded.

Word to Markdown Converter

Convert Word .docx files to clean Markdown with headings, bold, italics, links, lists and tables kept. Runs in your browser; nothing is uploaded.

AI File Limit Checker

Check file sizes, counts and token totals against the published upload limits for ChatGPT, Claude and Gemini. Runs in your browser; nothing is uploaded.

Markdown Table Generator

Turn CSV, Excel or Google Sheets data into a clean Markdown table with column alignment and escaped pipes. Runs in your browser; nothing is uploaded.

Markdown to PDF Converter

Convert Markdown to a clean PDF with selectable text, keeping headings, lists, tables, code blocks and links. Runs in your browser; nothing is uploaded.

Split PDF

Split a PDF by page ranges, every N pages or one page per file, or extract pages into a new PDF. Pages are copied exactly. Runs in your browser; nothing is uploaded.

Free Knowledge Base Builder

Clean and chunk one file into .txt knowledge files with token counts. Free, no signup, nothing stored.

All free tools →

Related guides