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.
Drop one or more .html files, or click to choose
Up to 20 files · 10MB each · converted in your browser, never uploaded
Converted in your browser, never uploaded. Snippets and full HTML pages both work.
How it works
- 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
Your browser converts it
Scripts, styles and comments are dropped. Headings, paragraphs, links, lists, tables, code blocks and images become their Markdown equivalents.
- 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 , 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.
Free Knowledge Base Builder
Clean and chunk one file into .txt knowledge files with token counts. Free, no signup, nothing stored.
Related guides
ChatGPT & Claude Knowledge Files
Formats, sizes and limits for ChatGPT and Claude knowledge files.
Document Prep, Chunking & RAG
Turn messy documents into clean, retrieval-ready chunks.
Tool Comparisons & Alternatives
How Knowledge Builder Pro compares to the alternatives.
ChatGPT & Claude Build Guides
Step-by-step builds for real use cases.