Paste to Clean Markdown (HTML, Word, Google Docs)
Paste HTML, Word, or Google Docs content and get clean Markdown with headings, lists, links, and tables intact, entirely in your browser.
# Weekly Research Notes This paragraph is one idea that Word wrapped across three separate lines when it exported to HTML. Read the [full report](https://example.com/report?page=2) for details. | Symptom | Cause | | ------------ | ---------------- | | Wall of text | Hard line breaks |
Overview
Paste rich text copied from a web page, Word, or Google Docs into the box above, or paste raw HTML directly. The tool converts it to Markdown, preserving headings, lists, links, and tables, then applies four optional cleanups: joining soft-wrapped lines back into paragraphs, stripping tracking parameters from links, demoting every heading one level, and dropping images. Nothing you paste is uploaded.
How it works
- 1Paste rich text from a web page, Word, or Google Docs into the box (or paste or type raw HTML directly, no mode switch needed).
- 2The tool detects HTML on your clipboard automatically and converts it to Markdown, keeping headings, lists, links, and tables.
- 3Turn on Unwrap line breaks to join lines Word or Google Docs split with a hard break back into one flowing paragraph.
- 4Turn on Strip tracking params to remove utm_ variants, fbclid, gclid, and ref from every link, leaving other query parameters alone.
- 5Turn on Demote headings if you are pasting content underneath an existing H1, so every heading shifts down one level, capped at H6.
- 6Uncheck Keep images if you want the Markdown to drop every pasted image instead of keeping its `` reference.
- 7Copy the cleaned Markdown with one click. Nothing you paste ever leaves your browser.
Worked example
Cleaning a Word export with a wrapped paragraph, a tracked link, and a table
Paste an HTML export containing an `<h1>`, a paragraph Word split across three lines with `<br>` tags, a link carrying `utm_source` and `utm_medium` tracking parameters alongside a real `page=2` parameter, and a two-column table. With the default toggles (unwrap line breaks and strip tracking params on, demote headings and image-dropping off), the tool returns the heading unchanged, the three `<br>`-separated lines rejoined into one sentence, the link with only `?page=2` left in its URL, and the table rendered as a Markdown pipe table with the Symptom column padded to 12 characters and the Cause column padded to 16, so it lines up correctly in any plain-text editor.
Methodology & privacy
HTML to Markdown conversion runs with turndown configured for ATX-style headings (a `#` prefix) and fenced code blocks. Turndown does not convert `<table>` elements into GitHub-Flavored-Markdown pipe syntax by default, so a custom rule reads each table's rows and cells directly from the DOM and hands them to a pure htmlTableToMarkdown function, which pads every cell to its column's widest value (minimum 3 characters, matching the GFM tables extension's separator-row requirement) and escapes any literal `|` inside a cell. After conversion, four independent passes clean up the resulting Markdown text: demoteHeadings shifts every heading's level up by one, capped at H6; the image toggle removes every `` when unchecked; stripTrackingParams removes utm_ variants, fbclid, gclid, and ref query parameters from every link and image URL while preserving every other parameter and its order; and unwrapLineBreaks rejoins soft-wrapped lines, the common symptom of Word and Google Docs inserting a `<br>` for every visually wrapped line, back into one flowing paragraph, while leaving headings, list items, table rows, and fenced code untouched. All four passes skip fenced code blocks, so example code in a pasted article is never rewritten.
- Source: Turndown: HTML to Markdown converter (README)
- Source: GitHub Flavored Markdown Spec, Tables extension
- Source: Obsidian Forum: HTML to Markdown without losing formatting
This tool converts HTML to Markdown entirely in your browser. Whatever you paste, rich text or raw HTML, and the Markdown it produces, are never uploaded, logged, or sent to a server.
FAQ
How do I convert HTML to Markdown online?
+
Paste rich text (copied from a web page, Word, Google Docs, or ChatGPT) into the box above, or paste raw HTML directly. The tool converts it to Markdown immediately in your browser, no upload and no account needed.
How do I paste from Word or Google Docs and keep the formatting?
+
Copy the content and paste it into the box above. The converter preserves headings, lists, links, and tables, and the Unwrap line breaks toggle rejoins the separate lines Word and Google Docs often insert for a single wrapped paragraph.
Why does pasting web content into my notes turn into a giant wall of text?
+
Most paste-to-markdown tools flatten every element into plain paragraphs, losing headings, ordered lists, and indentation. This tool converts the actual HTML structure (headings, lists, links, tables) into matching Markdown syntax instead of discarding it.
How do I clean up pasted Markdown formatting?
+
Use the four toggles above the output: Unwrap line breaks joins soft-wrapped lines into flowing paragraphs, Strip tracking params removes utm_ and similar tracking query parameters from links, Demote headings shifts every heading down a level, and unchecking Keep images drops pasted images.
How do I convert a web article to Markdown?
+
Select and copy the article text in your browser, then paste it into the box above. The tool reads the copied HTML from your clipboard and converts headings, paragraphs, links, and tables to Markdown without you leaving the page.
Does this tool support tables?
+
Yes, for simple tables. Each table's rows and cells are read from the pasted HTML and rendered as a column-aligned Markdown pipe table. Formatting inside a cell, such as bold text or a nested link, is flattened to plain text.
Does this tool upload my pasted content anywhere?
+
No. Reading the clipboard, converting HTML to Markdown, and cleaning up the result all happen with JavaScript running in your browser. Nothing you paste is sent to a server or stored.
Related tools
Markdown Table Formatter & CSV Converter
Paste a messy markdown table, CSV, or Excel copy and get it padded, aligned, and converted to Markdown or CSV instantly. Runs 100% in your browser.
Notion Export Cleaner (UUIDs, links, CSV databases)
Clean a Notion .zip export in your browser: strip UUID filenames, rewrite internal links, and turn CSV databases into Markdown tables. Nothing is uploaded.
ChatGPT/Claude Export to Markdown
Drop ChatGPT's conversations.json or a Claude export and get one clean Markdown file per conversation, code blocks intact, nothing uploaded.
Kindle Clippings to Markdown (no Readwise)
Turn your Kindle's My Clippings.txt into clean markdown, one file per book, with overlapping highlights merged. Runs in your browser, no Readwise needed.
Markdown Word Count & Reading Time
Count words and characters in markdown without frontmatter, code, or link syntax inflating the total, plus a per-heading breakdown and reading time.
This tool fixes one moment. recal handles the whole day.
recal is a private brain for your Mac. It watches how you work, on device, and starts doing your busywork itself. You approve every action.
Get early access